typescript-fsm
typescript-fsm copied to clipboard
Add onEnter and onExit hooks
Sometimes in a FSM is needed to just do something not on the transition but when you enter or exit one state. Would be nice to add this functionality.
Good example is your state "breaking" where you want only to log and you have to define the action for all the states that reach that state (would have more sense to do onEnter).