facebook/react v19.0.0 → v19.2.5

React 19.1–19.2 is a feature-heavy release that also carries a steady stream of React Server Components hardening work. The biggest themes are new rendering and debugging APIs, better SSR and partial prerendering support, and stricter upgrade requirements around the hooks ESLint plugin.

What's new

  • React adds Owner Stacks in development, a new stack trace format that shows which components are directly responsible for rendering a component. You can read them with the new captureOwnerStack API to improve debugging, logging, and custom error overlays without changing production component stacks. (#29923, #32353, #30306, #32538, #32529)

  • React 19.2 introduces <Activity>, a new API for hiding and restoring UI while preserving the internal state of its children. It is aimed at cases where you want to temporarily remove visible UI without resetting the subtree when it comes back.

  • useEffectEvent is now available as a React Hook for extracting non-reactive logic into an Effect Event. It is designed for cases where code should run from an effect without itself becoming reactive.

  • React Server Components gain cacheSignal, which lets you observe when a cache() lifetime is over. This gives RSC code a way to react to cache lifetime boundaries directly. (#33557)

  • React DOM adds resume APIs for partial prerendering across both Web Streams and Node Streams: resume, resumeAndPrerender, resumeToPipeableStream, and resumeAndPrerenderToNodeStream. The prerender APIs now also return a postponed state that can be passed into those resume APIs.

  • React 19.2 adds React Performance tracks in browser developer tools. These tracks separate component work from scheduler work and surface more detail about blocked time, suspended time, yielded time, events, and renders that never committed, making it easier to see what React was doing on the timeline. (#31525, #31548, #31552, #31563)

  • Suspense behavior is improved across client rendering, server rendering, and hydration. This includes broader support for placing Suspense boundaries anywhere, reduced unnecessary client rendering during hydration, higher priority for client-rendered boundaries, batched suspense reveals in React DOM, and better handling of dehydrated boundaries that resuspend. (#32069, #32163, #32224, #32252, #31751, #31776, #32900)

  • React Server Components add experimental unstable_prerender for prerendering on the server, support streaming in edge environments, expose registerServerReference in client builds, and add a react-server-dom-parcel package for Parcel integration. This expands the range of server environments and bundlers that can participate in the RSC pipeline. (#31724, #31852, #32534, #31725, #32132, #31799, #32294, #31741)

  • Server-side rendering APIs for Node.js now support Web Streams through prerender and renderToReadableStream. React DOM also enables the progressiveChunkSize option for SSR APIs. (#33475, #33027)

  • use-sync-external-store now includes an exports field in package.json, which improves support for different entrypoints in modern package resolution setups. (#25231)

Breaking changes

  • useId output changed format in this range. It first moved from :r123: to «r123» so the IDs are valid CSS selectors, and later React DOM switched to underscore-based IDs instead of :. If you depend on the exact generated ID format in selectors, tests, or snapshots, update those expectations. (#32001, #33099, #33422)

  • React.act is no longer exported in production builds. Code that referenced dev-only methods from production bundles will need to stop relying on them. (#32200)

  • React DOM no longer supports using HTML comments like <!-- --> as a DOM container. If you were mounting into a comment node, switch to a supported container element or document node. (#32250)

  • eslint-plugin-react-hooks 6.1.0 requires Node.js 18 or newer, and its default recommended preset now uses flat config. Legacy config moved to recommended-legacy. (#32458, #32457)

  • react-server-dom-webpack/*.unbundled moved to the private react-server-dom-unbundled package. If you imported those unbundled entrypoints directly, move away from them because they are no longer public surface area. (#35290)

Fixes

  • Fixed Owner Stacks so they work correctly with ES2015 function.name semantics. (#33680)

  • Fixed frozen Suspense fallback states by rendering unfinished Suspense boundaries on the client. (#31620)

  • Fixed a regression that caused incorrect key warnings for flattened positional children in development. (#32117)

  • Fixed streams hanging after a global error in React Server Components. (#31840, #31851)

  • Fixed pending chunks being counted twice in React Server Components. (#31833)

  • Fixed a crash when submitting forms with Client Actions. (#33055)

  • Fixed bugs in useDeferredValue, including an infinite loop during popstate and incorrect behavior when an initial value was provided. (#32821, #34376)

  • Fixed a bug with React.use inside a React.lazy component. (#33941)

  • Fixed a wrong missing key warning in React Server Components. (#34350)

  • Fixed Promise cycles, toString handling, and added extra loop and cycle protection for Server Functions. (#35289, #35345, #35351, #36236)

Other notable changes

  • React DOM now supports beforetoggle and toggle events on <dialog>. (#32479)

  • <script> and <template> can now be nested inside <select>. (#31837)

  • React DOM no longer warns when ARIA 1.3 attributes are used. (#34264)

  • Hoistable styles now allow nonce. (#32461)

  • Recent patch releases add more DoS mitigations to Server Actions and further harden Server Components. (#35632)

Contributors

@hoxyq, @acdlite, @sebmarkbage, @kassens, @eps1lon, @sophiebits, @Abdul-Omira, @Andarist, @rickhanlonii, @hi-ogawa, @gnoff, @denk0403, @lubieowoce, @jennyscript, @unstubbable, @michaelfaith, @poteto, @jbrown215, @Ayc0

Only a subset of merged work was included here because the range was truncated.

Only the most active 50 of 98 merged PRs were included. See the full compare view.