-
Notifications
You must be signed in to change notification settings - Fork 636
Open
Description
In your very finde article about state-machines
https://kentcdodds.com/blog/implementing-a-simple-state-machine-library-in-javascript
you put the onExit() and onEnter() events after the action() event:
destinationTransition.action()
currentStateDefinition.actions.onExit()
destinationStateDefinition.actions.onEnter()
Maybe i did not get the principles right, but wouldn't this order be the right one?
currentStateDefinition.actions.onExit()
destinationTransition.action()
destinationStateDefinition.actions.onEnter()
Metadata
Metadata
Assignees
Labels
No labels