react-dom
19.3.1 · 14 Oct 2026MIT260.6M / weekRepositoryHomepagenpmAtom feed
Upgrading react-dom From 18.3.1 to 19.0.0
1 release in betweenevery note read
- 30
- changes to make
- 0
- advisories fixed
- 45
- new
- 12
- fixes
Start here
Before you upgrade
Tick each one off as you go- Breaking19.0.0
- Breaking19.0.0
- Breaking19.0.0
- Breaking19.0.0
- Breaking19.0.0
- Breaking19.0.0
- Breaking19.0.0
- Breaking19.0.0
- Breaking19.0.0
- Breaking19.0.0
Release by release
- Breaking
Below is a list of all new features, APIs, deprecations, and breaking changes.
- Breaking
React 19 brings in a number of breaking changes, including the removals of long-deprecated APIs.
- Breaking
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.
- Breaking
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.
- Breaking
59 other lines we could not sort, mostly version bumps
- 19.0.0
<Context>as a provider: You can now render<Context>as a provider instead of<Context.Provider>. - 19.0.0
Cleanup functions for refs: When the component unmounts, React will call the cleanup function returned from the ref callback.
- 19.0.0
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. - 19.0.0
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. - 19.0.0
Diffs for hydration errors: In the case of a mismatch, React 19 logs a single error with a diff of the mismatched content.
- 19.0.0
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.
- 19.0.0
Disallow implicit return in refs: refs can now accept cleanup functions. When you return something else, we can’t tell if you intentionally returned something not meant to clean up or returned the wrong value. Implicit returns of anything but functions will now error.
- 19.0.0
Require initial argument to
useRef: The initial argument is now required to matchuseState,createContextetc - 19.0.0
Refs are mutable by default: Ref objects returned from
useRef()are now always mutable instead of sometimes being immutable. This feature was too confusing for users and conflicted with legit cases where refs were managed by React and manually written to. - 19.0.0
Strict
ReactElementtyping: The props of React elements now default tounknowninstead ofanyif the element is typed asReactElement
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.