You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const config = {
init: 'NEW',
transitions: [{
name: 'init', from: 'NEW', to: 'READY'
}],
methods: {
onBeforeTransition: function () {
// here any code always returning promise - with more sense than below ;)
return Promise.resolve(true);
}
}
}
const sm = new StateMachine(config);
console.log(sm.state); // here state is 'none' - no way to wait until sm is ready to be used.
an idea would be to provide some method i.e. pendingTransition() returning promise to be able to act only when state machine is ready to be used.
The text was updated successfully, but these errors were encountered:
For
an idea would be to provide some method i.e.
pendingTransition()
returning promise to be able to act only when state machine is ready to be used.The text was updated successfully, but these errors were encountered: