Skip to content
Version: xstate@5.0.0

ContextFactory type​

Signature:

export type ContextFactory<TContext extends MachineContext, TActor extends ProvidedActor, TInput> = ({ spawn, input }: {
spawn: Spawner<TActor>;
input: TInput;
}) => TContext;

References: MachineContext, ProvidedActor, Spawner