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

MachineFields

What a machine’s trait holds besides its context.

Type Parameter
Value
Property Type Description
history MachineHistory Where each history state goes back to.
pausedTicks Record<string, number> The ticks each wait had counted when it was left before its end, by its state’s id, which a history state brings back.
state Value The state it is in, as XState writes a value.
waitHeldTick number | null The tick a hold, MachinePausedTrait or one of heldBy, stopped the wait at; null while it runs.
waitStartTick number | null The tick the current state’s wait counts from: the tick it was entered on, moved on by each hold. Null where the state has no wait, and in a machine’s first state until its first advance. Read the seconds waited with read(target).waitedSeconds.