Skip to content

Interface: PlayerConfig<TMachine, TCapabilities>

API / @xmachines/play-xstate / index / PlayerConfig

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

The configuration of definePlayer()

Type Parameters

Type ParameterDefault type
TMachine extends AnyStateMachine-
TCapabilities extends objectobject

Properties

PropertyTypeDescriptionDefined in
actor?PlayerConstructor<TMachine, TCapabilities>The actor class to build, which decides which CAPABILITIES the actor carries. PlayerActor is the default, and it holds state and send alone. Compose a class to add a capability, and the factory then answers an actor with it: definePlayer({ machine, actor: compose(PlayerActor, withRouting, withView) }); An application that declares no route, and renders no view, passes nothing and loads neither body of code.packages/play-xstate/src/types.ts:31
machineTMachineThe XState v5 state machinepackages/play-xstate/src/types.ts:13
options?PlayerOptions<TMachine>The lifecycle hooks and the configurationpackages/play-xstate/src/types.ts:16