Skip to content

Interface: ActorProviderProps

API / @xmachines/play-svelte / ActorProviderProps

Defined in: packages/play-svelte/src/actor-context.svelte.ts:72

The framework-agnostic base props. Every ActorProvider implementation shares them: React, Vue, Solid, and Svelte. TRegistry holds the DefineRegistryResult type of the framework. RenderErrorHandler 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 } from "@xmachines/play-actor";
import type { DefineRegistryResult } from "@xmachines/json-render-react";
interface ActorProviderProps extends BaseActorProviderProps<DefineRegistryResult> {
fallback?: React.ReactNode;
children: React.ReactNode;
}

Extends

Extended by

Properties

PropertyTypeDescriptionInherited fromDefined in
actorAbstractActor<AnyActorLogic, EventObject> & ViewableThe actor instance with the currentView signal. It requires the Viewable capability.BaseActorProviderProps.actorpackages/play-actor/src/abstract-actor.ts:163
childrenSnippet--packages/play-svelte/src/actor-context.svelte.ts:75
fallback?Snippet<[]>--packages/play-svelte/src/actor-context.svelte.ts:73
onError?(error, reset) => void--packages/play-svelte/src/actor-context.svelte.ts:74
onRenderError?RenderErrorHandlerThe provider calls it when one catalog component throws during a render. This handler replaces every onRenderError of defineRegistry.BaseActorProviderProps.onRenderErrorpackages/play-actor/src/abstract-actor.ts:177
registryResultDefineRegistryResultThe complete result of defineRegistry(). It holds the component registry and the factory of the action handlers.BaseActorProviderProps.registryResultpackages/play-actor/src/abstract-actor.ts:165
store?StateStoreThe 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.BaseActorProviderProps.storepackages/play-actor/src/abstract-actor.ts:172