Define a way to register a handler that will be executed with the new state whenever the machine executes a transition
Define a way to register a handler that will be executed with the new state whenever the machine executes a transition