Skip to content

Variable: ActorProvider

API / @xmachines/play-react / ActorProvider

const ActorProvider: React.FC<ActorProviderProps>;

Defined in: packages/play-react/src/ActorProvider.tsx:168

ActorProvider — escape hatch primitive for composing actor lifecycle with custom providers.

Subscribes to actor.currentView signal, manages the per-view StateStore lifecycle, wraps children in StateProvider and PlayErrorBoundary, and injects onRenderError into the component registry.

Standard usage: prefer unless you need to compose providers manually.

Example

// Custom composition (escape hatch):
<ActorProvider actor={actor} registryResult={registryResult}>
<JSONUIProvider registry={registryResult.registry}>
<PlayRenderer />
</JSONUIProvider>
</ActorProvider>
// Standard usage: prefer PlayUIProvider
<PlayUIProvider actor={actor} registryResult={registryResult}>
<PlayRenderer />
</PlayUIProvider>