facebook/react
facebook/react
Activity
Last release
Open issues
Open PRs
License
release notes
release notes
Published 9/26/2017
MajorContains breaking changesLearn more in the React 16.0 announcement post!
render. (Docs coming soon!)ReactDOM.createPortal(). (Docs coming soon!)ReactDOMServer.renderToNodeStream() and ReactDOMServer.renderToStaticNodeStream(). (@aickin in #10425, #10044, #10039, #10024, #9264, and others.)ReactDOM.render() and ReactDOM.unstable_renderIntoContainer() now return null if called from inside a lifecycle method.
setState behavior:
setState with null no longer triggers an update. This allows you to decide in an updater function if you want to re-render.setState directly in render always causes an update. This was not previously the case. Regardless, you should not be calling setState from render.setState callback (second argument) now fires immediately after componentDidMount / componentDidUpdate instead of after all components have rendered.<A /> with <B />, B.componentWillMount now always happens before A.componentWillUnmount. Previously, A.componentWillUnmount could fire first in some cases.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.ReactDOM.unmountComponentAtNode. See this example.componentDidUpdate lifecycle no longer receives prevContext param. (@bvaughn in #8631)componentDidUpdate() because DOM refs are not available. This also makes it consistent with componentDidMount() (which does not get called in previous versions either).unstable_batchedUpdates() anymore.ReactDOM.unstable_batchedUpdates now 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.hydrate instead of ReactDOM.render if you're reviving server rendered HTML. Keep using ReactDOM.render if you're just doing client-side rendering.react-with-addons.js build anymore. All compatible addons are published separately on npm, and have single-file browser versions if you need them.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.release notes
Published 9/26/2017
MajorContains breaking changesLearn more in the React 16.0 announcement post!
render. (Docs coming soon!)ReactDOM.createPortal(). (Docs coming soon!)ReactDOMServer.renderToNodeStream() and ReactDOMServer.renderToStaticNodeStream(). (@aickin in #10425, #10044, #10039, #10024, #9264, and others.)ReactDOM.render() and ReactDOM.unstable_renderIntoContainer() now return null if called from inside a lifecycle method.
setState behavior:
setState with null no longer triggers an update. This allows you to decide in an updater function if you want to re-render.setState directly in render always causes an update. This was not previously the case. Regardless, you should not be calling setState from render.setState callback (second argument) now fires immediately after componentDidMount / componentDidUpdate instead of after all components have rendered.<A /> with <B />, B.componentWillMount now always happens before A.componentWillUnmount. Previously, A.componentWillUnmount could fire first in some cases.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.ReactDOM.unmountComponentAtNode. See this example.componentDidUpdate lifecycle no longer receives prevContext param. (@bvaughn in #8631)componentDidUpdate() because DOM refs are not available. This also makes it consistent with componentDidMount() (which does not get called in previous versions either).unstable_batchedUpdates() anymore.ReactDOM.unstable_batchedUpdates now 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.hydrate instead of ReactDOM.render if you're reviving server rendered HTML. Keep using ReactDOM.render if you're just doing client-side rendering.react-with-addons.js build anymore. All compatible addons are published separately on npm, and have single-file browser versions if you need them.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.