Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

TransitionConfig

One way out of a state on an event, as XState writes one.

Type Parameter
Context
Property Type Description
actions? MachineAction<Context> | readonly MachineAction<Context>[] -
guard? (args) => boolean Taken only when this returns true; the next in a list is tried otherwise.
reenter? boolean Leaves and enters the target again when it is the state already in, which starts its wait from zero.
target? string The state it goes to, as XState names one: a sibling’s key or sibling.child, .child for a state of its own, or #id.state.child from the machine’s top; in the machine’s own on, .state or #id.state. A name that is no state of the machine is a type error. Left out, it stays and runs its actions.