- Preparing search index...
- The search index is not available
reactive-actor
Function createStateMachineReducer
- createStateMachineReducer<TState, TInput>(stateMachine: Partial<Record<TState, Partial<Record<string | TInput["type"], TState>>>>): Reducer<TState, TInput>
-
Type Parameters
-
-
TInput extends Event<any, TInput>
Parameters
-
stateMachine: Partial<Record<TState, Partial<Record<string | TInput["type"], TState>>>>
Returns Reducer<TState, TInput>
Creates an event reducer from a state machine defined as a dictionary see:
EventStateMachineStructure
Returns
reducer function that process the next state based on current state and an event