Interface: ComponentContext<C, K>
API / @xmachines/play-dom / ComponentContext
Defined in: @xmachines/json-render-dom
Type Parameters
| Type Parameter |
|---|
C extends Catalog |
K extends keyof InferCatalogComponents<C> |
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
bindings | Record<string, string> | undefined | Two-way binding paths resolved from $bindState / $bindItem prop expressions. | - |
children | Node[] | The child nodes of the spec’s children list (the default slot). A getter: the children render at the first read, one time. A child that the component never reads does not mount, and a parameter that destructures children reads it at once. | - |
ctx | DomRenderContext | Low-level render context. | - |
emit | (event) => void | Dispatch a named event defined in the spec’s on map. | - |
on | (event) => EventHandle | Get an EventHandle for a named event from the spec’s on map. | - |
props | InferComponentProps<C, K> | Catalog-typed, store-resolved props for this component. | - |
slots? | Record<string, Node[]> | The nodes of each named slot of the spec’s slots map, or undefined when the element fills no named slot. Each slot is a getter that renders at its first read, as children does. Mirrors slots in @xmachines/json-render-react’s ComponentRenderProps. | - |