Skip to content

Kudzu 0.7.2 - React hook normalization

Choose a tag to compare

@bunzzeok bunzzeok released this 31 Jul 03:59

Kudzu 0.7.2 accepts more ordinary React/Vite hook syntax while preserving static HTML and capability-only JavaScript.

New in 0.7.2

  • Aliased supported React hooks normalize to canonical Kudzu hooks.
  • Direct members such as React.useState(...) compile without loading React.
  • Inline useCallback wrappers lower to existing handler specialization.
  • Unsupported members, indirect hook references, stale captured-state dependencies, and effectful dependency expressions fail with source locations.
  • Type-only React namespaces remain outside runtime migration validation.
  • A React/Vite-shaped fixture verifies browser interaction and a zero-JavaScript static route.

Boundary

useCallback requires an inline function and a literal array containing only identifiers or primitive literals. memo, useMemo, React classes, indirect hook references, side-effect React imports, and dynamic React imports remain unsupported. React, a VDOM, hydration, and a retained browser component tree are not emitted.

Upgrade

npm install @kudzujs/core@^0.7.2