onStateChange

Defines an action that will be invoked after a transition to a new state. Any exceptions thrown by the action will be ignored.