Function appendActionsToAllTransitions
- appendActionsToAllTransitions<TContext, TEvent, Action>(actions: Action[]): ((state: StructuredSourceStateNodeConfig<unknown, StateSchema<any>, EventObject>) => StructuredTransformedStateNodeConfig<unknown, StateSchema<any>, EventObject>)
-
Type Parameters
-
TContext
-
TEvent extends EventObject
-
Action extends ActionObject<TContext, TEvent, Action>
Produces a mapper to be used with mapStates to append the provided actions onto every transition in the mapped machine.
Example
Appending a logging action to every transition.
Returns
A mapper to be passed to mapStates