Type Alias: DefineRegistryOptions<C>
API / @xmachines/play-dom / DefineRegistryOptions
type DefineRegistryOptions<C> = object & CatalogHasActions<C> extends true ? object : object;Defined in: packages/play-dom/src/json-render/types.ts:428
Options for defineRegistry.
Mirrors DefineRegistryOptions<C> from @json-render/react, /solid, /svelte, /vue.
actions accepts catalog-typed async handler functions — params, setState, and state are
fully typed. When the catalog declares actions, actions is required; otherwise optional.
Type Declaration
| Name | Type | Description | Defined in |
|---|---|---|---|
components? | ComponentRegistry<C> | Catalog-typed component implementations. If omitted, all elements fall through to the fallback renderer (if provided) or return null — the container will be empty. | packages/play-dom/src/json-render/types.ts:434 |
Type Parameters
| Type Parameter |
|---|
C extends Catalog |
Example
actions: { login: async (params, setState, state) => { if (!params) return; setState(prev => ({ ...prev, loading: true })); actor.send({ type: 'auth.login', username: params.username }); },}