onEvent

Defines a default transition when an on is received to a specific state.

Parameters

event

Pair representing an on and targetState for transition. Can be written as EVENT to STATE

action

The action will be performed before transition is completed


Defines a default internal transition for a specific event with no change in state.

Parameters

event

The event that triggers this transition

action

The action will be invoked for this transition