variable / @typed/template

MANY_HOLE

Produces the closing hydration marker for a keyed-list item.

Package version
1.0.0-beta.13
Category
Keyed hydration markers
Since
1.0.0

Import

import { MANY_HOLE } from "@typed/template";

Signatures

export declare const MANY_HOLE: (key: PropertyKey) => string;

Why

Pass the same raw key supplied to many. SSR uses this constructor to emit item boundaries; hydration matches its encoded key to retain server nodes. Encoding keeps comments well-formed and distinguishes string, number, and globally registered symbol keys. Local symbols cannot survive hydration and throw an IllegalArgumentError.

Ownership and lifetime

This pure formatter owns no DOM node, list item, or Scope.

Examples

import { MANY_HOLE } from "@typed/template/many"

const marker = MANY_HOLE("item-1")

Other public imports

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

Source