on
Defines how to handle a specific event in this state. Multiple handlers can be registered for the same event type. When an event is processed, handlers are evaluated in registration order, and the first handler whose guard passes will be executed.
Parameters
event Class
The class of events to handle
configuration
The configuration block for the event handler
Defines how to handle a specific event using reified generics. Multiple handlers can be registered for the same event type. When an event is processed, handlers are evaluated in registration order, and the first handler whose guard passes will be executed.
Parameters
configuration
The configuration block for the event handler