Skip to content
Version: xstate@5.0.0

State.(constructor)​

Creates a new State instance that represents the current state of a running machine.

Signature:

constructor(config: StateConfig<TContext, TEvent>, machine: AnyStateMachine);

Parameters​

ParameterTypeDescription
configStateConfig<TContext, TEvent>
machineAnyStateMachine