StateMachine

class Communicator.Util.StateMachine()

Interfaces

Action()

Type aliases

StateReducer

Constructors

constructor()

Methods

handle()


Type aliases

StateReducer

Constructors

constructor

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

  • reducer (Communicator.Util.StateMachine.StateReducer()) –

Return type

Communicator.Util.StateMachine

Methods

handle

Communicator.Util.StateMachine.handle(evt, payload)

Handle an action and update the state

Arguments
  • evt (ActionNames()) – The action to handle

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

Return type

void