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 Parameter | Default type |
|---|---|
TMachine extends AnyStateMachine | - |
TCapabilities extends object | object |
Properties
| Property | Type | Description | Defined 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 |
machine | TMachine | The XState v5 state machine | packages/play-xstate/src/types.ts:13 |
options? | PlayerOptions<TMachine> | The lifecycle hooks and the configuration | packages/play-xstate/src/types.ts:16 |