jsx
The JSX runtime entry for one child (jsx(type, props)).
The JSX runtime entry for one child (jsx(type, props)). Keys are ignored; the tree is the same as h's.
Import#
ts
import { jsx } from "@shadow-js/dusk";
Signature#
ts
function jsx(
type: string | OgComponent,
props: Readonly<Record<string, unknown>>,
): OgElement
Parameters#
| Name | Description |
|---|---|
type |
The tag or component. |
props |
The props, with children. |
Returns#
The element.
Examples#
ts
import { jsx } from "@shadow-js/dusk/og";
jsx("p", { children: "Hi" }); // { type: "p", props: { children: "Hi" } }