Open igittigitt opened 5 months ago
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()
I'm not positive, it was a long time ago that I wrote this blog post. But if you can link me to the part in the specification that says I'm wrong, then I'm happy to correct it!
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:
Maybe i did not get the principles right, but wouldn't this order be the right one?