Skip to content
Version: xstate@5.0.0

Actor.(constructor)​

Creates a new actor instance for the given logic with the provided options, if any.

Signature:

constructor(logic: TLogic, options?: ActorOptions<TLogic>);

Parameters​

ParameterTypeDescription
logicTLogicThe logic to create an actor from
optionsActorOptions<TLogic>(Optional) Actor options