This repository was archived by the owner on Jun 6, 2023. It is now read-only.
Update react-dom from 15.6.1 to 16.0.0 #4
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
react-dom has been updated to 16.0.0 by dependencies.io
16.0.0
16.0.0 (September 26, 2017)
Learn more in the React 16.0 announcement post!
New JS Environment Requirements
New Features
render. (Docs coming soon!)ReactDOM.createPortal(). (Docs coming soon!)ReactDOMServer.renderToNodeStream()andReactDOMServer.renderToStaticNodeStream(). (aickin in #10425, #10044, #10039, #10024, #9264, and others.)Breaking Changes
ReactDOM.render()andReactDOM.unstable_renderIntoContainer()now returnnullif called from inside a lifecycle method.setStatebehavior:setStatewith null no longer triggers an update. This allows you to decide in an updater function if you want to re-render.setStatedirectly in render always causes an update. This was not previously the case. Regardless, you should not be callingsetStatefrom render.setStatecallback (second argument) now fires immediately aftercomponentDidMount/componentDidUpdateinstead of after all components have rendered.<A />with<B />,B.componentWillMountnow always happens beforeA.componentWillUnmount. Previously,A.componentWillUnmountcould fire first in some cases.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.ReactDOM.unmountComponentAtNode. See this example.componentDidUpdatelifecycle no longer receivesprevContextparam. (bvaughn in #8631)componentDidUpdate()because DOM refs are not available. This also makes it consistent withcomponentDidMount()(which does not get called in previous versions either).unstable_batchedUpdates()anymore.ReactDOM.unstable_batchedUpdatesnow only takes one extra argument after the callback.react/dist/react.js→react/umd/react.development.jsreact/dist/react.min.js→react/umd/react.production.min.jsreact-dom/dist/react-dom.js→react-dom/umd/react-dom.development.jsreact-dom/dist/react-dom.min.js→react-dom/umd/react-dom.production.min.jsReactDOM.hydrateinstead ofReactDOM.renderif you're reviving server rendered HTML. Keep usingReactDOM.renderif you're just doing client-side rendering.Removed Deprecations
react-with-addons.jsbuild anymore. All compatible addons are published separately on npm, and have single-file browser versions if you need them.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.15.6.2
All Packages
React DOM
document.documentModewould trigger IE detection in other browsers, breaking change events. (aweary in #10032)onChangewould not fire withdefaultCheckedon radio inputs. (jquense in #10156)controlListattribute to DOM property whitelist (nhunzaker in #9940)