MachineOptions
for the definition.
StateNodeDefinition 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 concat
s to
ensure that you are preserving the parts of the source state
that you aren't direclty modifying.
Generated using TypeDoc
Most users will prefer to use mapStates. Only use
mapStatesFromDefinition
if you already have a StateNodeDefinition.See
MapStatesMapper.
Returns
The new
StateNodeConfig
resulting from applyingmapper
to each state.