Below is a list of all new features, APIs, and bug fixes.
Read the React 19.2 release post for more information.
New React Features
<Activity>: A new API to hide and restore the UI and internal state of its children.useEffectEventis a React Hook that lets you extract non-reactive logic into an Effect Event.cacheSignal(for RSCs) lets your know when thecache()lifetime is over.- React Performance tracks appear on the Performance panel’s timeline in your browser developer tools
New React DOM Features
- Added resume APIs for partial pre-rendering with Web Streams:
resume: to resume a prerender to a stream.resumeAndPrerender: to resume a prerender to HTML.
- Added resume APIs for partial pre-rendering with Node Streams:
resumeToPipeableStream: to resume a prerender to a stream.resumeAndPrerenderToNodeStream: to resume a prerender to HTML.
- Updated
prerenderAPIs to return apostponedstate that can be passed to theresumeAPIs.
Notable changes
- React DOM now batches suspense boundary reveals, matching the behavior of client side rendering. This change is especially noticeable when animating the reveal of Suspense boundaries e.g. with the upcoming
<ViewTransition>Component. React will batch as much reveals as possible before the first paint while trying to hit popular first-contentful paint metrics. - Add Node Web Streams (
prerender,renderToReadableStream) to server-side-rendering APIs for Node.js - Use underscore instead of
:IDs generated by useId
All Changes
React
<Activity />was developed over many years, starting beforeClassComponent.setState(@acdlite @sebmarkbage and many others)- Stringify context as "SomeContext" instead of "SomeContext.Provider" (@kassens #33507)
- Include stack of cause of React instrumentation errors with
%oplaceholder (@eps1lon #34198) - Fix infinite
useDeferredValueloop in popstate event (@acdlite #32821) - Fix a bug when an initial value was passed to
useDeferredValue(@acdlite #34376) - Fix a crash when submitting forms with Client Actions (@sebmarkbage #33055)
- Hide/unhide the content of dehydrated suspense boundaries if they resuspend (@sebmarkbage #32900)
- Avoid stack overflow on wide trees during Hot Reload (@sophiebits #34145)
- Improve Owner and Component stacks in various places (@sebmarkbage, @eps1lon: #33629, #33724, #32735, #33723)
- Add
cacheSignal(@sebmarkbage #33557)
React DOM
- Block on Suspensey Fonts during reveal of server-side-rendered content (@sebmarkbage #33342)
- Use underscore instead of
:for IDs generated byuseId(@sebmarkbage, @eps1lon: #32001, #33342#33099, #33422) - Stop warning when ARIA 1.3 attributes are used (@Abdul-Omira #34264)
- Allow
nonceto be used on hoistable styles (@Andarist #32461) - Warn for using a React owned node as a Container if it also has text content (@sebmarkbage #32774)
- s/HTML/text for for error messages if text hydration mismatches (@rickhanlonii #32763)
- Fix a bug with
React.useinsideReact.lazy-ed Component (@hi-ogawa #33941) - Enable the
progressiveChunkSizeoption for server-side-rendering APIs (@sebmarkbage #33027) - Fix a bug with deeply nested Suspense inside Suspense fallback when server-side-rendering (@gnoff #33467)
- Avoid hanging when suspending after aborting while rendering (@gnoff #34192)
- Add Node Web Streams to server-side-rendering APIs for Node.js (@sebmarkbage #33475)
React Server Components
- Preload
<img>and<link>using hints before they're rendered (@sebmarkbage #34604) - Log error if production elements are rendered during development (@eps1lon #34189)
- Fix a bug when returning a Temporary reference (e.g. a Client Reference) from Server Functions (@sebmarkbage #34084, @denk0403 #33761)
- Pass line/column to
filterStackFrame(@eps1lon #33707) - Support Async Modules in Turbopack Server References (@lubieowoce #34531)
- Add support for .mjs file extension in Webpack (@jennyscript #33028)
- Fix a wrong missing key warning (@unstubbable #34350)
- Make console log resolve in predictable order (@sebmarkbage #33665)
React Reconciler
- createContainer and createHydrationContainer had their parameter order adjusted after
on*handlers to account for upcoming experimental APIs
eslint-plugin-react-hooks@6.1.0
Note: Version 6.0.0 was mistakenly released and immediately deprecated and untagged on npm. This is the first official 6.x major release and includes breaking changes.
- Breaking: Require Node.js 18 or newer. (@michaelfaith in #32458)
- Breaking: Flat config is now the default
recommendedpreset. Legacy config moved torecommended-legacy. (@michaelfaith in #32457) - New Violations: Disallow calling
usewithin try/catch blocks. (@poteto in #34040) - New Violations: Disallow calling
useEffectEventfunctions in arbitrary closures. (@jbrown215 in #33544) - Handle
React.useEffectin addition touseEffectin rules-of-hooks. (@Ayc0 in #34076) - Added
react-hookssettings config option that to acceptadditionalEffectHooksthat are used across exhaustive-deps and rules-of-hooks rules. (@jbrown215) in #34497