StateMachine
- class Util.StateMachine()
StateMachine<State, ActionNames> is a minimalist state machine
Constructors
Methods
Constructors
- StateMachine.constructor(state, reducer)
- Arguments
state (
State()) – Nonereducer (
StateReducer) – None
- Return type
StateMachine <State, ActionNames>
Methods
handle
- StateMachine.handle(evt[, payload])
- Arguments
evt (
ActionNames()) – The action to handlepayload (
any()) – optional The payload if any
Handle an action and update the state
- Return type
void