Releases: facebook/react
19.2.1 (December 3rd, 2025)
React Server Components
- Bring React Server Component fixes to Server Actions (@sebmarkbage #35277)
19.1.2 (December 3rd, 2025)
React Server Components
- Bring React Server Component fixes to Server Actions (@sebmarkbage #35277)
19.0.1 (December 3rd, 2025)
React Server Components
- Bring React Server Component fixes to Server Actions (@sebmarkbage #35277)
19.2.0 (Oct 1, 2025)
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
[email protected]
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
19.1.1 (July 28, 2025)
19.1.0 (March 28, 2025)
Owner Stack
An Owner Stack is a string representing the components that are directly responsible for rendering a particular component. You can log Owner Stacks when debugging or use Owner Stacks to enhance error overlays or other development tools. Owner Stacks are only available in development builds. Component Stacks in production are unchanged.
- An Owner Stack is a development-only stack trace that helps identify which components are responsible for rendering a particular component. An Owner Stack is distinct from a Component Stacks, which shows the hierarchy of components leading to an error.
- The captureOwnerStack API is only available in development mode and returns a Owner Stack, if available. The API can be used to enhance error overlays or log component relationships when debugging. #29923, #32353, #30306,
#32538, #32529, #32538
React
- Enhanced support for Suspense boundaries to be used anywhere, including the client, server, and during hydration. #32069, #32163, #32224, #32252
- Reduced unnecessary client rendering through improved hydration scheduling #31751
- Increased priority of client rendered Suspense boundaries #31776
- Fixed frozen fallback states by rendering unfinished Suspense boundaries on the client. #31620
- Reduced garbage collection pressure by improving Suspense boundary retries. #31667
- Fixed erroneous βWaiting for Paintβ log when the passive effect phase was not delayed #31526
- Fixed a regression causing key warnings for flattened positional children in development mode. #32117
- Updated
useIdto use valid CSS selectors, changing format from:r123:toΒ«r123Β». #32001 - Added a dev-only warning for null/undefined created in useEffect, useInsertionEffect, and useLayoutEffect. #32355
- Fixed a bug where dev-only methods were exported in production builds. React.act is no longer available in production builds. #32200
- Improved consistency across prod and dev to improve compatibility with Google Closure Complier and bindings #31808
- Improve passive effect scheduling for consistent task yielding. #31785
- Fixed asserts in React Native when passChildrenWhenCloningPersistedNodes is enabled for OffscreenComponent rendering. #32528
- Fixed component name resolution for Portal #32640
- Added support for beforetoggle and toggle events on the dialog element. #32479 #32479
React DOM
- Fixed double warning when the
hrefattribute is an empty string #31783 - Fixed an edge case where
getHoistableRoot()didnβt work properly when the container was a Document #32321 - Removed support for using HTML comments (e.g.
<!-- -->) as a DOM container. #32250 - Added support for
<script>and<template>tags to be nested within<select>tags. #31837 - Fixed responsive images to be preloaded as HTML instead of headers #32445
use-sync-external-store
- Added
exportsfield topackage.jsonforuse-sync-external-storeto support various entrypoints. #25231
React Server Components
- Added
unstable_prerender, a new experimental API for prerendering React Server Components on the server #31724 - Fixed an issue where streams would hang when receiving new chunks after a global error #31840, #31851
- Fixed an issue where pending chunks were counted twice. #31833
- Added support for streaming in edge environments #31852
- Added support for sending custom error names from a server so that they are available in the client for console replaying. #32116
- Updated the server component wire format to remove IDs for hints and console.log because they have no return value #31671
- Exposed
registerServerReferencein client builds to handle server references in different environments. #32534 - Added react-server-dom-parcel package which integrates Server Components with the Parcel bundler #31725, #32132, #31799, #32294, #31741
19.0.0 (December 5, 2024)
Below is a list of all new features, APIs, deprecations, and breaking changes. Read React 19 release post and React 19 upgrade guide for more information.
Note: To help make the upgrade to React 19 easier, weβve published a [email protected] release that is identical to 18.2 but adds warnings for deprecated APIs and other changes that are needed for React 19. We recommend upgrading to React 18.3.1 first to help identify any issues before upgrading to React 19.
New Features
React
- Actions:
startTransitioncan now accept async functions. Functions passed tostartTransitionare called βActionsβ. A given Transition can include one or more Actions which update state in the background and update the UI with one commit. In addition to updating state, Actions can now perform side effects including async requests, and the Action will wait for the work to finish before finishing the Transition. This feature allows Transitions to include side effects likefetch()in the pending state, and provides support for error handling, and optimistic updates. useActionState: is a new hook to order Actions inside of a Transition with access to the state of the action, and the pending state. It accepts a reducer that can call Actions, and the initial state used for first render. It also accepts an optional string that is used if the action is passed to a formactionprop to support progressive enhancement in forms.useOptimistic: is a new hook to update state while a Transition is in progress. It returns the state, and a set function that can be called inside a transition to βoptimisticallyβ update the state to expected final value immediately while the Transition completes in the background. When the transition finishes, the state is updated to the new value.use: is a new API that allows reading resources in render. In React 19,useaccepts a promise or Context. If provided a promise,usewill suspend until a value is resolved.usecan only be used in render but can be called conditionally.refas a prop: Refs can now be used as props, removing the need forforwardRef.- Suspense sibling pre-warming: When a component suspends, React will immediately commit the fallback of the nearest Suspense boundary, without waiting for the entire sibling tree to render. After the fallback commits, React will schedule another render for the suspended siblings to βpre-warmβ lazy requests.
React DOM Client
<form> actionprop: Form Actions allow you to manage forms automatically and integrate withuseFormStatus. When a<form> actionsucceeds, React will automatically reset the form for uncontrolled components. The form can be reset manually with the newrequestFormResetAPI.<button> and <input> formActionprop: Actions can be passed to theformActionprop to configure form submission behavior. This allows using different Actions depending on the input.useFormStatus: is a new hook that provides the status of the parent<form> action, as if the form was a Context provider. The hook returns the values:pending,data,method, andaction.- Support for Document Metadata: Weβve added support for rendering document metadata tags in components natively. React will automatically hoist them into the
<head>section of the document. - Support for Stylesheets: React 19 will ensure stylesheets are inserted into the
<head>on the client before revealing the content of a Suspense boundary that depends on that stylesheet. - Support for async scripts: Async scripts can be rendered anywhere in the component tree and React will handle ordering and deduplication.
- Support for preloading resources: React 19 ships with
preinit,preload,prefetchDNS, andpreconnectAPIs to optimize initial page loads by moving discovery of additional resources like fonts out of stylesheet loading. They can also be used to prefetch resources used by an anticipated navigation.
React DOM Server
- Added
prerenderandprerenderToNodeStreamAPIs for static site generation. They are designed to work with streaming environments like Node.js Streams and Web Streams. UnlikerenderToString, they wait for data to load for HTML generation.
React Server Components
- RSC features such as directives, server components, and server functions are now stable. This means libraries that ship with Server Components can now target React 19 as a peer dependency with a react-server export condition for use in frameworks that support the Full-stack React Architecture. The underlying APIs used to implement a React Server Components bundler or framework do not follow semver and may break between minors in React 19.x. See docs for how to support React Server Components.
Deprecations
- Deprecated:
element.refaccess: React 19 supports ref as a prop, so weβre deprecatingelement.refin favor ofelement.props.ref. Accessing will result in a warning. react-test-renderer: In React 19, react-test-renderer logs a deprecation warning and has switched to concurrent rendering for web usage. We recommend migrating your tests to @testinglibrary.com/docs/react-testing-library/intro/) or @testingesting-library.com/docs/react-native-testing-library/intro)
Breaking Changes
React 19 brings in a number of breaking changes, including the removals of long-deprecated APIs. We recommend first upgrading to 18.3.1, where we've added additional deprecation warnings. Check out the upgrade guide for more details and guidance on codemodding.
React
- New JSX Transform is now required: We introduced a new JSX transform in 2020 to improve bundle size and use JSX without importing React. In React 19, weβre adding additional improvements like using ref as a prop and JSX speed improvements that require the new transform.
- Errors in render are not re-thrown: Errors that are not caught by an Error Boundary are now reported to window.reportError. Errors that are caught by an Error Boundary are reported to console.error. Weβve introduced
onUncaughtErrorandonCaughtErrormethods tocreateRootandhydrateRootto customize this error handling. - Removed:
propTypes: UsingpropTypeswill now be silently ignored. If required, we recommend migrating to TypeScript or another type-checking solution. - Removed:
defaultPropsfor functions: ES6 default parameters can be used in place. Class components continue to supportdefaultPropssince there is no ES6 alternative. - Removed:
contextTypesandgetChildContext: Legacy Context for class components has been removed in favor of thecontextTypeAPI. - Removed: string refs: Any usage of string refs need to be migrated to ref callbacks.
- Removed: Module pattern factories: A rarely used pattern that can be migrated to regular functions.
- Removed:
React.createFactory: Now that JSX is broadly supported, allcreateFactoryusage can be migrated to JSX components. - Removed:
react-test-renderer/shallow: This has been a re-export of react-shallow-renderer since React 18. If needed, you can continue to use the third-party package directly. We recommend using @testinglibrary.com/docs/react-testing-library/intro/) or @testingesting-library.com/docs/react-native-testing-library/intro) instead.
React DOM
- Removed:
react-dom/test-utils: Weβve movedactfromreact-dom/test-utilsto react. All other utilities have been removed. - Removed:
ReactDOM.render,ReactDOM.hydrate: These have been removed in favor of the concurrent equivalents:ReactDOM.createRootandReactDOM.hydrateRoot. - Removed:
unmountComponentAtNode: Removed in favor ofroot.unmount(). - Removed:
ReactDOM.findDOMNode: You can replaceReactDOM.findDOMNodewith DOM Refs.
Notable Changes
React
<Context>as a provider: You can now render<Context>as a provider instead of<Context.Provider>.- Cleanup functions for refs: When the component unmounts, React will call the cleanup function returned from the ref callback.
useDeferredValueinitial value argument: When provided,useDeferredValuewill return the initial value for the initial render of a component, then schedule a re-render in the background with thedeferredValuereturned.- Support for Custom Elements: React 19 now passes all tests on Custom Elements Everywhere.
- StrictMode changes:
useMemoanduseCallbackwill now reuse the memoized results from the first render, during the second render. Additionally, StrictMode will now double-invoke ref callback functions on initial mount. - UMD builds removed: To load React 19 with a script tag, we recommend using an ESM-based CDN such as esm.sh.
React DOM
- Diffs for hydration errors: In the case of a mismatch, React 19 logs a single error with a diff of the mismatched content.
- Compatibility with third-party scripts and extensions: React will now force a client re-render to fix up any mismatched content caused by elements inserted by third-party JS.
TypeScript Changes
The most common changes can be codemodded with npx types-react-codemod@latest preset-19 ./path-to-your-react-ts-files.
- Removed deprecated TypeScript types:
ReactChild(replacement:React.ReactElement | number | string)ReactFragment(replacement:Iterable<React.ReactNode>)ReactNodeArray(replacement:ReadonlyArray<React.ReactNode>)ReactText(replacement:...
[email protected] (Oct 11, 2024)
This release only contains eslint-plugin-react-hooks. Notably, new violations and support for ESLint v9 were added.
eslint-plugin-react-hooks
- New Violations: Component names now need to start with an uppercase letter instead of a non-lowercase letter. This means
_Buttonor_componentare no longer valid. (@kassens) in #25162
For example, infunction _Component() { useState() ^^^^^^^^ A React Hook "useState" is called in function "_Component" which is neither a Component nor a custom React Hook function. }
_Componentshould be renamed toComponent.
- Add support for ESLint v9. (@eps1lon in #28773)
- Consider dispatch from
useActionStatestable. (@eps1lon in #29665) - Accept
asexpression in callback. (@StyleShit in #28202) - Accept
asexpressions in deps array. (@StyleShit in #28189) - Treat
React.use()the same asuse(). (@kassens in #27769) - Move
use()lint to non-experimental. (@kassens in #27768) - Support Flow
asexpressions. (@cpojer in #27590) - Allow
useEffect(fn, undefined). (@kassens in #27525) - Disallow hooks in async functions. (@acdlite in #27045)
- Rename experimental
useEventtouseEffectEvent. (@sebmarkbage in #25881) - Lint for presence of
useEventfunctions in dependency lists. (@poteto in #25512) - Check
useEventreferences instead. (@poteto in #25319) - Update
RulesOfHookswithuseEventrules. (@poteto in #25285)
18.3.1 (April 26, 2024)
- Export
actfromreactf1338f
18.3.0 (April 25, 2024)
This release is identical to 18.2 but adds warnings for deprecated APIs and other changes that are needed for React 19.
Read the React 19 Upgrade Guide for more info.
React
- Allow writing to
this.refsto support string ref codemod 909071 - Warn for deprecated
findDOMNodeoutside StrictMode c3b283 - Warn for deprecated
test-utilsmethods d4ea75 - Warn for deprecated Legacy Context outside StrictMode 415ee0
- Warn for deprecated string refs outside StrictMode #25383
- Warn for deprecated
defaultPropsfor function components #25699 - Warn when spreading
key#25697 - Warn when using
actfromtest-utilsd4ea75