StateMachine

class Util.StateMachine()

StateMachine<State, ActionNames> is a minimalist state machine

Constructors

Methods


Constructors

StateMachine.constructor(state, reducer)
Arguments
  • state (State()) – None

  • reducer (StateReducer) – None

Return type

StateMachine <State, ActionNames>

Methods

handle

StateMachine.handle(evt[, payload])
Arguments
  • evt (ActionNames()) – The action to handle

  • payload (any()) – optional The payload if any

Handle an action and update the state

Return type

void