Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/xstate/src/StateMachine.ts>StateMachine#transition

State machines and statecharts for the modern web.
Go to Latest
method StateMachine.prototype.transition
import { StateMachine } from "https://deno.land/x/xstate@xstate@5.0.0-beta.23/src/StateMachine.ts";

Determines the next state given the current state and received event. Calculates a full macrostep from all microsteps.

Parameters

state: State<TContext, TEvent, TActor, TOutput, TResolvedTypesMeta>

The current State instance or state value

event: TEvent

The received event

actorCtx: ActorContext<TEvent, state>

Returns

State<TContext, TEvent, TActor, TOutput, TResolvedTypesMeta>