function / @typed/ui/Dom/Props

forwardHostProps

Extracts top-level refs and event handlers from component options.

Learn this UI primitive →

Package version
1.0.0-beta.13
Category
Prop forwarding
Since
1.0.0

Import

import { forwardHostProps } from "@typed/ui/Dom/Props";

Signatures

export declare function forwardHostProps<const Options extends object>(options: Options): ForwardedHostProps<Options>;

Why

Convenience event/ref options can enter the same deterministic host merge as props.

Ownership and lifetime

Returns a shallow object. The rendering Scope owns any contained listener/ref work.

Source