State.from() method​
Creates a new State instance for the given stateValue
and context
.
Signature:
static from<TContext extends MachineContext, TEvent extends EventObject = EventObject>(stateValue: State<TContext, TEvent, TODO, any, // tags
any> | StateValue, context: TContext | undefined, machine: AnyStateMachine): State<TContext, TEvent, TODO, any, // tags
any>;
Parameters​
Parameter | Type | Description |
---|---|---|
stateValue | State<TContext, TEvent, TODO, any, // tags any> | StateValue | |
context | TContext | undefined | |
machine | AnyStateMachine |
Returns: