type-alias / @typed/ui/Dom

HostRenderer

Function signature for rendering an arbitrary DOM host.

Learn this UI primitive →

Package version
1.0.0-beta.13
Category
Host rendering types
Since
1.0.0

Import

import type { HostRenderer } from "@typed/ui/Dom";

This public exposure is a re-export. Its import path is supported; declaration documentation is shared with the other public exposures below.

Signatures

export type HostRenderer<Element extends globalThis.Element, A = RenderEvent, E = never, R = never, Props extends HostProps<Element> = HostProps<Element>, Content extends RenderableInput = RenderableInput> = (props: Props, content: Content) => Fx<A, E, R> | Effect.Effect<A, E, R>;

Why

Components can target native templates or external DOM-producing systems through the same Fx<RenderEvent, E, R> substrate.

Ownership and lifetime

Returning a value starts no work by itself. The caller’s rendering Scope owns the returned Effect or Fx and any nodes represented by its render events.

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source