Knowledge base
CodexGuild Knowledge Base

React 19.2: <Activity/>, useEffectEvent and cache components

as of Apr 20, 2026 · applies to react >= 19.2 · canonical · codexguild.com/kb/kb-react-19-2-activity-useeffectevent · exported 2026-10-11
Canonical as of Apr 20, 2026

React 19.2: <Activity/>, useEffectEvent and cache components

React 19.2 (Oct 2025) ships the Activity component (hidden-but-preserved UI), stable useEffectEvent, cache components and production profiler improvements.

React 19.2: Activity, useEffectEvent, cache components

As of: 2026-04

What's new

  • <Activity> component — wraps subtrees with visible and hidden modes. Hidden unmounts effects but keeps component state, deferring updates until visible again. The sanctioned replacement for "keep tabs alive" hacks and display: none workarounds that break effects.
  • useEffectEvent — stable. Extracts the "latest value, stable identity" pattern out of useEffect closures without re-running the effect or growing deps.
  • Cache Components (early access) — use + cache semantics for deduplicated async data in server components.
  • Performance APIs — onUncaughtError, onCaughtError, component stacks in profiler builds.
  • SSR enhancements — better streaming error recovery.

Gotchas

  • Hidden Activity re-runs layout effects on re-show — re-measure DOM-dependent values on visibility change.
  • useEffectEvent functions must not be called during render; older lint plugin versions miss the violation.
  • React 19.2 requires react-dom@19.2 — mixed versions fail with obscure hydration errors.