Is it possible?
I tried in a different ways but I always get an error.
I need to do something like this:
states: A, B and C.
transition: step.
From state A, 'step' transition must be a function which returns B or C depending on asynchronous operation.
var fsm = new StateMachine({
init: 'A',
transitions: [
{ name: 'step',
from: 'A',
to: async function() {
var state = await getState()
return state
}
}
]
});
Is it possible? I tried in a different ways but I always get an error.
I need to do something like this: states: A, B and C. transition: step.
From state A, 'step' transition must be a function which returns B or C depending on asynchronous operation.
Thanks in advance.