Type Alias: ComponentFn<C, K>
API / @xmachines/play-solid / ComponentFn
type ComponentFn<C, K> = (ctx) => JSX.Element;Defined in: @json-render/solid
Component render function type for Solid
Type Parameters
| Type Parameter |
|---|
C extends Catalog |
K extends keyof InferCatalogComponents<C> |
Parameters
| Parameter | Type |
|---|---|
ctx | ComponentContext<C, K> |
Returns
JSX.Element
Example
const Button: ComponentFn<typeof catalog, 'Button'> = (ctx) => ( <button onClick={() => ctx.emit("press")}>{ctx.props.label}</button>);