Skip to content

Interface: PlayerFactoryResumeOptions<TMachine>

API / @xmachines/play-xstate / PlayerFactoryResumeOptions

Defined in: packages/play-xstate/src/types.ts:115

The optional restore arguments of the player factory.

The shape follows the options object of createActor in XState. It also keeps the createPlayer(input?) calling convention of a new actor.

Type Parameters

Type Parameter
TMachine extends AnyStateMachine

Properties

PropertyTypeDescriptionDefined in
snapshot?Snapshot<unknown>The persisted XState snapshot. The factory restores the actor state from it. Its type is the ActorOptions["snapshot"] type of XState, which is the exact type that createActor accepts and that getPersistedSnapshot() returns. The restore of a stored snapshot therefore needs no cast.packages/play-xstate/src/types.ts:123