@gomani/core@1.2.0
npm size budget2.3 KB / 4.0 KB ✓
@gomani/core
renderToString() returns { html, islands }. Non-island subtrees are inert HTML — the cheapest thing to deliver and run. Islands are transparent markers carrying serialised props, resumed on demand by @gomani/runtime.
API
island
function
island<P>(component: Component<P>, strategy?: IslandStrategy): Component<P>
Mark a component as an interactivity island. Only islands contribute to the shipped/executed budget. Strategy: load | idle | visible | interaction | media.
renderToString
function
renderToString(node: VNode): { html: string; islands: IslandRef[] }
Server-render a tree to static HTML plus the set of islands to resume. Deterministic; ships no JavaScript for non-islands.
jsx
function
jsx(type: VNodeType, props: Props): VNode
The automatic JSX runtime entry (jsxImportSource: '@gomani/core').