Skip to content
Version: xstate@5.0.0

StateMachine.resolveState() method​

Resolves the given state to a new State instance relative to this machine.

This ensures that .nextEvents represent the correct values.

Signature:

resolveState(state: State<TContext, TEvent, TActor, TTag, TResolvedTypesMeta>): MachineSnapshot<TContext, TEvent, TActor, TTag, TOutput, TResolvedTypesMeta>;

Parameters​

ParameterTypeDescription
stateState<TContext, TEvent, TActor, TTag, TResolvedTypesMeta>The state to resolve

Returns:

MachineSnapshot<TContext, TEvent, TActor, TTag, TOutput, TResolvedTypesMeta>