react-dom
19.3.1 · 14 Oct 2026MIT260.6M / weekRepositoryHomepagenpmAtom feed
Upgrading react-dom From 15.7.0 to 16.0.0
1 release in betweenevery note read
- 4
- changes to make
- 0
- advisories fixed
- 7
- new
- 0
- fixes
Before you upgrade
Tick each one off as you go- Breaking16.0.0
- Breaking16.0.0
- Breaking16.0.0
- Breaking16.0.0
Security
1 advisory still affects 16.0.0
- Cross-Site Scripting in react-dommoderate · GHSA-mvjj-gqq2-p4hw
Upgrading to 16.0.1 clears it.
Release by release
- Breaking
React DOM now allows passing non-standard attributes. (@nhunzaker in #10385, 10564, #10495 and others)
- Breaking
Errors in the render and lifecycle methods now unmount the component tree by default. To prevent this, add error boundaries to the appropriate places in the UI.
- Breaking
There is no
react-with-addons.jsbuild anymore. All compatible addons are published separately on npm, and have single-file browser versions if you need them. - Breaking
The deprecations introduced in 15.x have been removed from the core package.
React.createClassis now available as create-react-class,React.PropTypesas prop-types,React.DOMas react-dom-factories, react-addons-test-utils as react-dom/test-utils, and shallow renderer as react-test-renderer/shallow. See 15.5.0 and 15.6.0 blog posts for instructions on migrating code and automated codemods.
- Breaking
16 other lines we could not sort, mostly version bumps
- 16.0.0
ReactDOM.render()andReactDOM.unstable_renderIntoContainer()now returnnullif called from inside a lifecycle method. - 16.0.0
Calling
setStatewith null no longer triggers an update. This allows you to decide in an updater function if you want to re-render. - 16.0.0
Calling
setStatedirectly in render always causes an update. This was not previously the case. Regardless, you should not be callingsetStatefrom render. - 16.0.0
setStatecallback (second argument) now fires immediately aftercomponentDidMount/componentDidUpdateinstead of after all components have rendered. - 16.0.0
When replacing
<A />with<B />,B.componentWillMountnow always happens beforeA.componentWillUnmount. Previously,A.componentWillUnmountcould fire first in some cases. - 16.0.0
Previously, changing the
refto a component would always detach the ref before that component's render is called. Now, we change thereflater, when applying the changes to the DOM. - 16.0.0
It is not safe to re-render into a container that was modified by something other than React. This worked previously in some cases but was never supported. We now emit a warning in this case. Instead you should clean up your component trees using
ReactDOM.unmountComponentAtNode. See this example. - 16.0.0
- 16.0.0
Non-unique keys may now cause children to be duplicated and/or omitted. Using non-unique keys is not (and has never been) supported, but previously it was a hard error.
- 16.0.0
Shallow renderer no longer calls
componentDidUpdate()because DOM refs are not available. This also makes it consistent withcomponentDidMount()(which does not get called in previous versions either).
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.