createActor
Callable
Type parameters
- TLogic: AnyActorLogic
Parameters
logic: TLogic extends AnyStateMachine ? AreAllImplementationsAssumedToBeProvided<TLogic[__TResolvedTypesMeta]> extends true ? TLogic : [Some implementations missing, Values<{ [ K in string | number | symbol ]: Prop<Prop<TLogic[__TResolvedTypesMeta], resolved>, missingImplementations>[K] }>] : TLogic
The actor logic to create an actor from. For a state machine actor logic creator, see createMachine. Other actor logic creators include fromCallback, fromEventObservable, fromObservable, fromPromise, and fromTransition.
optionaloptions: ActorOptions<TLogic>
Actor options
Returns Actor<TLogic>
Creates a new actor instance for the given actor logic with the provided options, if any.
When you create an actor from actor logic via
createActor(logic)
, you implicitly create an actor system where the created actor is the root actor. Any actors spawned from this root actor and its descendants are part of that actor system.