Open
Description
The page has this snippet:
green: {
onEntry: "startHttpRequest",
onExit: "cancelHttpRequest",
...
}
followed shortly thereafter by this snippet:
function transition(event, data) {
currentState = stateMachine.transition(currentState, event, data);
field.classList.value = currentState.value;
currentState.actions.forEach(item => window[item]());
}
There's no explanation of how onEntry
and onExit
get mapped to actions
. (I think I worked it out but it seems like it would be worth spelling it out explicitly for the reader?)
Metadata
Metadata
Assignees
Labels
No labels