Interface: BaseActorProviderProps<TRegistry, TActor>
API / @xmachines/play-view / index / BaseActorProviderProps
Defined in: packages/play-view/src/view-types.ts:214
The framework-agnostic base props. Every ActorProvider implementation shares
them: React, Vue, Solid, and Svelte. TRegistry holds the
DefineRegistryResult type of the framework. OnRenderError comes from
@xmachines/json-render-core, and a second generic parameter is therefore not
necessary.
Each framework package extends this interface with its fallback field, its
onError field, and its children field.
Example
import type { BaseActorProviderProps, ViewActor } from "@xmachines/play-view";import type { DefineRegistryResult } from "@xmachines/json-render-react";
interface ActorProviderProps extends BaseActorProviderProps<DefineRegistryResult> { fallback?: React.ReactNode; children: React.ReactNode;}Extended by
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TRegistry extends object | - | The DefineRegistryResult type of the framework. |
TActor extends ViewActor | ViewActor | - |
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
actor | TActor | The actor instance with the currentView atom. It requires the Viewable capability. | packages/play-view/src/view-types.ts:219 |
onRenderError? | OnRenderError | The renderer calls it with (error, name, info) for each failure that it reports: a catalog component that throws, a prop or a visible condition that fails, an action chain or a watch chain that fails, and a failure of the root. info.kind names the kind of the failure. A handler with the two parameters (error, name) stays valid. This handler replaces every onRenderError of defineRegistry. | packages/play-view/src/view-types.ts:236 |
registryResult | TRegistry | The complete result of defineRegistry(). It holds the component registry and the factory of the action handlers. | packages/play-view/src/view-types.ts:221 |
store? | StateStore | The optional external StateStore, which is the controlled mode. With this option, the provider ignores spec.state, and this store is the single source of truth. Without it, the provider makes a new @xstate/store atom for each view transition, with the values of spec.state. | packages/play-view/src/view-types.ts:228 |