Skip to content

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

PropertyTypeDescriptionDefined in
bindingsRecord<string, string> | undefinedTwo-way binding paths resolved from $bindState / $bindItem prop expressions.-
childrenNode[]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.-
ctxDomRenderContextLow-level render context.-
emit(event) => voidDispatch a named event defined in the spec’s on map.-
on(event) => EventHandleGet an EventHandle for a named event from the spec’s on map.-
propsInferComponentProps<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.-