Skip to content

Kudzu 0.7.3 - React memo normalization

Choose a tag to compare

@bunzzeok bunzzeok released this 31 Jul 04:36
· 63 commits to main since this release

Kudzu 0.7.3 accepts common React memo authoring forms while preserving build-time components, direct state bindings, static HTML, and capability-only JavaScript.

New in 0.7.3

  • memo(Component) and aliased or direct-member equivalents lower to same-file build-time function components.
  • Inline useCallback wrappers lower directly to analyzable handler functions without a browser memo cache.
  • Inline synchronous useMemo callbacks may return one expression over primitive literals and direct local state.
  • Memoized state expressions inline at same-component JSX uses so existing bindings update without component rerenders.
  • Static pages wrapped in memo remain JavaScript-free.
  • Component shadowing, impure expressions, incomplete dependencies, duplicate memo locals, and nested captures fail with source locations.
  • The React/Vite fixture verifies repeated counter and derived-value updates plus a zero-JavaScript static route.

Boundary

memo identifiers must name unshadowed same-file top-level function components. useMemo locals must use unique const declarations, may reference only direct local state and primitive literals, and cannot cross nested function boundaries. No browser component cache, React runtime, VDOM, hydration, or retained component tree is emitted.

Upgrade

npm install @kudzujs/core@^0.7.3