Skip to content

Kudzu 0.7.13 - Deterministic useId

Choose a tag to compare

@bunzzeok bunzzeok released this 02 Aug 05:58
· 50 commits to main since this release

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

  • useId may be imported directly or with an alias from react, 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 by id, 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.13

The matching project generator is create-kudzu@0.1.68.