onEnter

fun onEnter(action: (state: S) -> Unit)

Defines an action to run when entering this state.

Parameters

action

The action to run