Packages

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

Other targets from 15.7.0Latest19.3.1
  1. 15.7.0yours
  2. 16.0.0target
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

Upgrading to 16.0.1 clears it.

Release by release

  1. 16.0.0

    Migration needed26 Sep 20177 new
    • Breaking
    • 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.js build 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.createClass is now available as create-react-class, React.PropTypes as prop-types, React.DOM as 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.

16 other lines we could not sort, mostly version bumps
  • ReactDOM.render() and ReactDOM.unstable_renderIntoContainer() now return null if called from inside a lifecycle method.

    16.0.0
  • Calling setState with 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 setState directly in render always causes an update. This was not previously the case. Regardless, you should not be calling setState from render.

    16.0.0
  • setState callback (second argument) now fires immediately after componentDidMount / componentDidUpdate instead of after all components have rendered.

    16.0.0
  • When replacing <A /> with <B />, B.componentWillMount now always happens before A.componentWillUnmount. Previously, A.componentWillUnmount could fire first in some cases.

    16.0.0
  • Previously, changing the ref to a component would always detach the ref before that component's render is called. Now, we change the ref later, 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
  • componentDidUpdate lifecycle no longer receives prevContext param. (@bvaughn in #8631)

    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 with componentDidMount() (which does not get called in previous versions either).

    16.0.0

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.