Interface: DefineRegistryResult
API / @xmachines/play-dom / DefineRegistryResult
Defined in: packages/play-dom/src/json-render/types.ts:455
Result returned by defineRegistry.
Matches DefineRegistryResult from @json-render/react, /solid, /svelte, /vue.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
executeAction | (actionName, params, setState, state?) => Promise<void> | Execute a named action by name, with optional params. Mirrors executeAction on DefineRegistryResult from @json-render/react, /solid, /vue, /svelte. Useful for programmatically triggering actions outside of the emit/on flow. | packages/play-dom/src/json-render/types.ts:485 |
handlers | (getSetState, getState) => Record<string, ActionHandler> | Create ActionProvider-compatible handlers. Accepts getter functions (called lazily at action-invocation time) so handlers always see the latest setState and state snapshot — matching the pattern from the framework renderers. In PlayRenderer, these are wired automatically from the xstate store. Pass () => undefined, () => ({}) only in tests or when state management is not needed. | packages/play-dom/src/json-render/types.ts:470 |
registry | DomRegistry | The built DomRegistry, ready to pass to PlayRenderer, createPlayUI, or createRenderer. | packages/play-dom/src/json-render/types.ts:459 |