Kudzu 0.7.13 - Deterministic useId
Kudzu 0.7.13 preserves conventional top-level React useId() authoring while emitting deterministic static HTML IDs with no browser runtime.
New in 0.7.13
useIdmay be imported directly or with an alias fromreact, or called as a direct default/namespace React member.- Each top-level
const id = useId()receives a stable build-time ID that can be reused byid,htmlFor, and ARIA ID-reference attributes. - Repeated component calls receive distinct IDs, while unchanged clean builds reproduce the same output.
- Shared layouts and route content use separate ID namespaces.
- Static routes remain JavaScript-free; no hook dispatcher, hydration metadata, or browser component function is emitted.
- Calls with arguments, non-top-level forms, and keyed-row ownership fail with source-located diagnostics.
Boundary
useId() accepts no arguments and must initialize one top-level const identifier in an ordinary component. Keyed rows remain unsupported because cloned row templates require key-scoped rewriting of id, for, ARIA IDREF, and fragment-reference attributes; Kudzu rejects the unsafe shape instead of emitting duplicate IDs.
Upgrade
npm install @kudzujs/core@^0.7.13The matching project generator is create-kudzu@0.1.68.