StateMachine or StateNode to map over.
Function that maps the existing node and a state path to a possibly-updated new state.
Generally, mapper should return a modified copy of the provided state.
E.g. with (state) => ({ ...state, modifications: "here" })
You should likely have lots of ...s and concats to
ensure that you are preserving the parts of the source state
that you aren't direclty modifying.
Generated using TypeDoc
Construct a new
StateNodeConfig(suitable for passing tocreateMachine) by walking an existingStateMachine(e.g. the output ofcreateMachine) and replacing each state with the output of the suppliedmapperapplied to that state.Example
Update state metadata:
See
MapStatesMapper.
Returns
The new
MachineConfigresulting from applyingmapperto each state.