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#getInitialState

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

Returns the initial State instance, with reference to self as an ActorRef.

Parameters

actorCtx: ActorContext<TEvent, State<TContext, TEvent, TActor, TOutput, TResolvedTypesMeta>>
optional
input: TInput

Returns

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