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