From dcbbeaea29fc3a57ea106f0e9c5f66359a666c7a Mon Sep 17 00:00:00 2001 From: Flarnie Marchan Date: Mon, 18 Sep 2017 14:37:00 +1000 Subject: [PATCH 01/13] First shot at updating changelog for 16.0 **what is the change?:** Added an 'unreleased' section to the changelog with info from https://github.com/facebook/react/issues/10294 **why make this change?:** To get things set for the 16.0 release. **test plan:** Visual inspection **issue:** https://github.com/facebook/react/issues/8854 --- CHANGELOG.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3bfeaf4a4210..8fa68e5d3f6a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,53 @@ +## [Unreleased] +
+ + Changes that have landed in master but are not yet released. + Click to see more. + + +### JS Environment Requirements + + * React 16 depends on the collection types [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) and [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set). If you support older browsers and devices which may not yet provide these natively (eg ` with ``, `B.componentWillMount` now always happens before `A.componentWillUnmount`. Previously, `A.componentWillUnmount` could fire first in some cases. +* 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. +* 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.](https://github.com/facebook/react/issues/10294#issuecomment-318820987) +* `componentDidUpdate` lifecycle no longer receives `prevContext` param. (See #8631) +* 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). +* Shallow renderer does not implement `unstable_batchedUpdates()` anymore. +- **The names and paths to the single-file browser builds have changed to emphasize the difference between development and production builds.** For example: + - react/dist/react.js → react/umd/react.development.js + - react/dist/react.min.js → react/umd/react.production.min.js + - react-dom/dist/react-dom.js → react-dom/umd/react-dom.development.js + - react-dom/dist/react-dom.min.js → react-dom/umd/react-dom.production.min.js +* ReactDOM.createPortal() is official and stable + ([@gaearon](https://github.com/gaearon) in + [10675](https://github.com/facebook/react/pull/10675)) +* Allow [passing some "unknown" attributes through to DOM components](https://facebook.github.io/react/blog/2017/09/08/dom-attributes-in-react-16.html) (@nhunzaker in https://github.com/facebook/react/pull/10385 , https://github.com/facebook/react/pull/10564 , https://github.com/facebook/react/pull/10495 and others) + +#### Removed deprecations + +- **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. +- **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](https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html) and [15.6.0](https://facebook.github.io/react/blog/2017/06/13/react-v15.6.0.html) blog posts for instructions on migrating code and automated codemods. + +### New helpful warnings + + * Improve error message when ReactDOM loads without React (@aweary in https://github.com/facebook/react/pull/10449) + * Warn when nesting 15 subtree inside 16 (@sophiebits in https://github.com/facebook/react/pull/10434) + +
+ ## 15.6.1 (June 14, 2017) ### React DOM From b6231654ae40cae8c2867acc1321f350567c35df Mon Sep 17 00:00:00 2001 From: Flarnie Marchan Date: Mon, 18 Sep 2017 15:51:33 +1000 Subject: [PATCH 02/13] Fix typos and formatting errors in changelog --- CHANGELOG.md | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fa68e5d3f6a1..a319f58c0abd1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,25 +7,24 @@ ### JS Environment Requirements - * React 16 depends on the collection types [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) and [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set). If you support older browsers and devices which may not yet provide these natively (eg ` with ``, `B.componentWillMount` now always happens before `A.componentWillUnmount`. Previously, `A.componentWillUnmount` could fire first in some cases. -* 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. -* 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.](https://github.com/facebook/react/issues/10294#issuecomment-318820987) -* `componentDidUpdate` lifecycle no longer receives `prevContext` param. (See #8631) -* 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). -* Shallow renderer does not implement `unstable_batchedUpdates()` anymore. + * When replacing `` with ``, `B.componentWillMount` now always happens before `A.componentWillUnmount`. Previously, `A.componentWillUnmount` could fire first in some cases. + * 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. + * 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.](https://github.com/facebook/react/issues/10294#issuecomment-318820987) + * `componentDidUpdate` lifecycle no longer receives `prevContext` param. (See #8631) + * 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). + * Shallow renderer does not implement `unstable_batchedUpdates()` anymore. - **The names and paths to the single-file browser builds have changed to emphasize the difference between development and production builds.** For example: - react/dist/react.js → react/umd/react.development.js - react/dist/react.min.js → react/umd/react.production.min.js @@ -36,7 +35,7 @@ [10675](https://github.com/facebook/react/pull/10675)) * Allow [passing some "unknown" attributes through to DOM components](https://facebook.github.io/react/blog/2017/09/08/dom-attributes-in-react-16.html) (@nhunzaker in https://github.com/facebook/react/pull/10385 , https://github.com/facebook/react/pull/10564 , https://github.com/facebook/react/pull/10495 and others) -#### Removed deprecations +### Removed deprecations - **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. - **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](https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html) and [15.6.0](https://facebook.github.io/react/blog/2017/06/13/react-v15.6.0.html) blog posts for instructions on migrating code and automated codemods. From 68ff634b10d8f582e26e08f37497b8feaf2fd090 Mon Sep 17 00:00:00 2001 From: Flarnie Marchan Date: Wed, 20 Sep 2017 10:14:49 -0700 Subject: [PATCH 03/13] Add requestAnimationFrame and remove "New helpful warnings" **what is the change?:** In response to helpful code review - - Add mention of dependency on `requestAnimationFrame` and need to polyfill that as well as `Map` and `Set` - Remove "New helpful warnings" section; it was incomplete, and there are so many new and updated warnings that it might not be reasonable to cover them in the changelog. **why make this change?:** Accuracy **test plan:** Visual inspection **issue:** issue #8854 --- CHANGELOG.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a319f58c0abd1..85edeb4f227b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ ### JS Environment Requirements - * **React 16 depends on the collection types [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) and [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set).** If you support older browsers and devices which may not yet provide these natively (eg ## 15.6.1 (June 14, 2017) From 8df6b69d5da6fcd3127e62396aa049fa40e0d842 Mon Sep 17 00:00:00 2001 From: Flarnie Marchan Date: Wed, 20 Sep 2017 10:18:35 -0700 Subject: [PATCH 04/13] Improve wording --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85edeb4f227b3..9c0dee8e7577c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ ### JS Environment Requirements - * **React 16 depends on the collection types [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) and [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set), as well as on [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame).** If you support older browsers and devices which may not yet provide these natively (eg Date: Thu, 21 Sep 2017 13:34:48 -0700 Subject: [PATCH 05/13] Improve wording and fix missing links --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c0dee8e7577c..5dcecb4b6d75e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,9 @@ Click to see more. -### JS Environment Requirements +### New JS Environment Requirements - * **React 16 depends on the collection types [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) and [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set), as well as [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame).** If you support older browsers and devices which may not yet provide these natively (eg ` with ``, `B.componentWillMount` now always happens before `A.componentWillUnmount`. Previously, `A.componentWillUnmount` could fire first in some cases. * 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. * 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.](https://github.com/facebook/react/issues/10294#issuecomment-318820987) - * `componentDidUpdate` lifecycle no longer receives `prevContext` param. (See #8631) + * `componentDidUpdate` lifecycle no longer receives `prevContext` param. ([@bvaughn](https://github.com/bvaughn) in [#8631](https://github.com/facebook/react/pull/8631)) * 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). * Shallow renderer does not implement `unstable_batchedUpdates()` anymore. - **The names and paths to the single-file browser builds have changed to emphasize the difference between development and production builds.** For example: @@ -33,7 +33,7 @@ * ReactDOM.createPortal() is official and stable ([@gaearon](https://github.com/gaearon) in [10675](https://github.com/facebook/react/pull/10675)) -* Allow [passing some "unknown" attributes through to DOM components](https://facebook.github.io/react/blog/2017/09/08/dom-attributes-in-react-16.html) (@nhunzaker in https://github.com/facebook/react/pull/10385 , https://github.com/facebook/react/pull/10564 , https://github.com/facebook/react/pull/10495 and others) +* Allow [passing some "unknown" attributes through to DOM components](https://facebook.github.io/react/blog/2017/09/08/dom-attributes-in-react-16.html) ([@nhunzaker](https://github.com/nhunzaker) in [#10385](https://github.com/facebook/react/pull/10385), [10564](https://github.com/facebook/react/pull/10564), [#10495](https://github.com/facebook/react/pull/10495) and others) ### Removed deprecations From 42f2b0c7f91fb1810fa633b98f8ce37e0a5311a2 Mon Sep 17 00:00:00 2001 From: Flarnie Marchan Date: Thu, 21 Sep 2017 13:45:21 -0700 Subject: [PATCH 06/13] Add backticks to file names & code; wording tweak --- CHANGELOG.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5dcecb4b6d75e..a6f20b03d26e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,30 +15,30 @@ - **There are several changes to the behavior of scheduling and lifecycle methods:** * `ReactDOM.render()` and `ReactDOM.unstable_renderIntoContainer()` now return `null` if called from inside a lifecycle method. * To work around this, you can either use [the new portal API](https://github.com/facebook/react/issues/10309#issuecomment-318433235) or [refs](https://github.com/facebook/react/issues/10309#issuecomment-318434635). - * `setState`: + * Minor changes to `setState` behavior: * Calling `setState` with null no longer triggers an update. This allows you to decide in an updater function if you want to re-render. * Calling `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. * When replacing `` with ``, `B.componentWillMount` now always happens before `A.componentWillUnmount`. Previously, `A.componentWillUnmount` could fire first in some cases. - * 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. + * 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. * 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.](https://github.com/facebook/react/issues/10294#issuecomment-318820987) * `componentDidUpdate` lifecycle no longer receives `prevContext` param. ([@bvaughn](https://github.com/bvaughn) in [#8631](https://github.com/facebook/react/pull/8631)) * 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). * Shallow renderer does not implement `unstable_batchedUpdates()` anymore. - **The names and paths to the single-file browser builds have changed to emphasize the difference between development and production builds.** For example: - - react/dist/react.js → react/umd/react.development.js - - react/dist/react.min.js → react/umd/react.production.min.js - - react-dom/dist/react-dom.js → react-dom/umd/react-dom.development.js - - react-dom/dist/react-dom.min.js → react-dom/umd/react-dom.production.min.js -* ReactDOM.createPortal() is official and stable + - `react/dist/react.js` → `react/umd/react.development.js` + - `react/dist/react.min.js` → `react/umd/react.production.min.js` + - `react-dom/dist/react-dom.js` → `react-dom/umd/react-dom.development.js` + - `react-dom/dist/react-dom.min.js` → `react-dom/umd/react-dom.production.min.js` +* `ReactDOM.createPortal()` is official and stable ([@gaearon](https://github.com/gaearon) in [10675](https://github.com/facebook/react/pull/10675)) * Allow [passing some "unknown" attributes through to DOM components](https://facebook.github.io/react/blog/2017/09/08/dom-attributes-in-react-16.html) ([@nhunzaker](https://github.com/nhunzaker) in [#10385](https://github.com/facebook/react/pull/10385), [10564](https://github.com/facebook/react/pull/10564), [#10495](https://github.com/facebook/react/pull/10495) and others) ### Removed deprecations -- **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. -- **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](https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html) and [15.6.0](https://facebook.github.io/react/blog/2017/06/13/react-v15.6.0.html) blog posts for instructions on migrating code and automated codemods. +- **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. +- **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](https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html) and [15.6.0](https://facebook.github.io/react/blog/2017/06/13/react-v15.6.0.html) blog posts for instructions on migrating code and automated codemods. From bfb2e58c4610d1e8d439ea9fd50bab74d0e829a9 Mon Sep 17 00:00:00 2001 From: Flarnie Marchan Date: Thu, 21 Sep 2017 13:48:46 -0700 Subject: [PATCH 07/13] Break "Major Changes" into "New Feature" and "Breaking Changes" --- CHANGELOG.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6f20b03d26e8..b25cbb0686b29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,9 +9,14 @@ * **React 16 depends on the collection types [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) and [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set), as well as [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame).** If you support older browsers and devices which may not yet provide these natively (eg Date: Thu, 21 Sep 2017 14:09:40 -0700 Subject: [PATCH 08/13] Add server side render changes to 16.0 changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b25cbb0686b29..6b5cdc69ec79e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ * `ReactDOM.createPortal()` is official and stable ([@gaearon](https://github.com/gaearon) in [10675](https://github.com/facebook/react/pull/10675)) +* Streaming mode for server side rendering is enabled with `ReactDOMServer.renderToNodeStream()` and `ReactDOMServer.renderToStaticNodeStream()`. ([@aickin](https://github.com/aickin) in [#10425](https://github.com/facebook/react/pull/10425), [#10044](https://github.com/facebook/react/pull/10044), [#10039](https://github.com/facebook/react/pull/10039), [#10024](https://github.com/facebook/react/pull/10024), [#9264](https://github.com/facebook/react/pull/9264), and others.) * Allow [passing some "unknown" attributes through to DOM components](https://facebook.github.io/react/blog/2017/09/08/dom-attributes-in-react-16.html) ([@nhunzaker](https://github.com/nhunzaker) in [#10385](https://github.com/facebook/react/pull/10385), [10564](https://github.com/facebook/react/pull/10564), [#10495](https://github.com/facebook/react/pull/10495) and others) ### Breaking Changes @@ -35,6 +36,9 @@ - `react/dist/react.min.js` → `react/umd/react.production.min.js` - `react-dom/dist/react-dom.js` → `react-dom/umd/react-dom.development.js` - `react-dom/dist/react-dom.min.js` → `react-dom/umd/react-dom.production.min.js` +* The server renderer has been completely rewritten, with some improvements: + * Server rendering does not use markup validation anymore, and instead tries its best to attach to existing DOM, warning about inconsistencies. And there is no data-reactid anymore. + * Hydrating a server rendered container now has an explicit API. Use `ReactDOM.hydrate` instead of `ReactDOM.render` if you're reviving server rendered HTML. Keep using `ReactDOM.render` if you're just doing client-side rendering. * When "unknown" props are passed to DOM components, in some cases, React will now render them in the DOM. [See this post for more details.](https://facebook.github.io/react/blog/2017/09/08/dom-attributes-in-react-16.html) ([@nhunzaker](https://github.com/nhunzaker) in [#10385](https://github.com/facebook/react/pull/10385), [10564](https://github.com/facebook/react/pull/10564), [#10495](https://github.com/facebook/react/pull/10495) and others) ### Removed deprecations From 9e900f1f4ca4a36b375746c128e3865d5219968b Mon Sep 17 00:00:00 2001 From: Flarnie Marchan Date: Thu, 21 Sep 2017 14:19:07 -0700 Subject: [PATCH 09/13] Change gist link from mine to gaearons --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b5cdc69ec79e..920037823f4b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ ### New JS Environment Requirements - * **React 16 depends on the collection types [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) and [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set), as well as [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame).** If you support older browsers and devices which may not yet provide these natively (eg Date: Thu, 21 Sep 2017 14:39:42 -0700 Subject: [PATCH 10/13] Add note about returning fragments --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 920037823f4b7..64d2f22629bda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ * **React 16 depends on the collection types [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) and [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set), as well as [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame).** If you support older browsers and devices which may not yet provide these natively (eg Date: Thu, 21 Sep 2017 14:50:48 -0700 Subject: [PATCH 11/13] fix misc nits --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64d2f22629bda..4a2ccedfb249d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ * **Improved error handling with introduction of "error boundaries".** [Error boundaries](https://facebook.github.io/react/blog/2017/07/26/error-handling-in-react-16.html) are React components that catch JavaScript errors anywhere in their child component tree, log those errors, and display a fallback UI instead of the component tree that crashed. * `ReactDOM.createPortal()` is official and stable ([@gaearon](https://github.com/gaearon) in - [10675](https://github.com/facebook/react/pull/10675)) + [#10675](https://github.com/facebook/react/pull/10675)) * Streaming mode for server side rendering is enabled with `ReactDOMServer.renderToNodeStream()` and `ReactDOMServer.renderToStaticNodeStream()`. ([@aickin](https://github.com/aickin) in [#10425](https://github.com/facebook/react/pull/10425), [#10044](https://github.com/facebook/react/pull/10044), [#10039](https://github.com/facebook/react/pull/10039), [#10024](https://github.com/facebook/react/pull/10024), [#9264](https://github.com/facebook/react/pull/9264), and others.) * Allow [passing some "unknown" attributes through to DOM components](https://facebook.github.io/react/blog/2017/09/08/dom-attributes-in-react-16.html) ([@nhunzaker](https://github.com/nhunzaker) in [#10385](https://github.com/facebook/react/pull/10385), [10564](https://github.com/facebook/react/pull/10564), [#10495](https://github.com/facebook/react/pull/10495) and others) @@ -24,7 +24,7 @@ * To work around this, you can either use [the new portal API](https://github.com/facebook/react/issues/10309#issuecomment-318433235) or [refs](https://github.com/facebook/react/issues/10309#issuecomment-318434635). * Minor changes to `setState` behavior: * Calling `setState` with null no longer triggers an update. This allows you to decide in an updater function if you want to re-render. - * Calling `setState` directly in render always causes an update. This was not previously the case. Regardless, you should not be calling setState from render. + * Calling `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. * When replacing `` with ``, `B.componentWillMount` now always happens before `A.componentWillUnmount`. Previously, `A.componentWillUnmount` could fire first in some cases. * 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. From a26aef4877f3776a8eddcadb110588a86922f072 Mon Sep 17 00:00:00 2001 From: Flarnie Marchan Date: Fri, 22 Sep 2017 14:30:54 -0700 Subject: [PATCH 12/13] Misc. formatting/wording fixes to changelog **what is the change?:** Thanks to the kind code review comments of @gaearon and @nhunzaker we have - removed the non-deterministic bold styling on some bullet points - improved wording of the bullet points for portals, attribute whitelist changes, and server rendering changes - Add note about error boundaries including a breaking change to error handling behavior. - punctuation and capitalization fixes **why make this change?:** Clarity and correctness **test plan:** Visual inspection **issue:** https://github.com/facebook/react/issues/8854 --- CHANGELOG.md | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a2ccedfb249d..b9d9668681af6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,19 +7,17 @@ ### New JS Environment Requirements - * **React 16 depends on the collection types [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) and [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set), as well as [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame).** If you support older browsers and devices which may not yet provide these natively (eg From 8ee0ec053debc03556cf2ea3a850eb5bb0889aa9 Mon Sep 17 00:00:00 2001 From: Flarnie Marchan Date: Fri, 22 Sep 2017 14:49:22 -0700 Subject: [PATCH 13/13] fix broken link --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9d9668681af6..a66a87e9154ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ * Improved error handling with introduction of "error boundaries". [Error boundaries](https://facebook.github.io/react/blog/2017/07/26/error-handling-in-react-16.html) are React components that catch JavaScript errors anywhere in their child component tree, log those errors, and display a fallback UI instead of the component tree that crashed. * First-class support for declaratively rendering a subtree into another DOM node with `ReactDOM.createPortal()`. (Docs coming soon!) * Streaming mode for server side rendering is enabled with `ReactDOMServer.renderToNodeStream()` and `ReactDOMServer.renderToStaticNodeStream()`. ([@aickin](https://github.com/aickin) in [#10425](https://github.com/facebook/react/pull/10425), [#10044](https://github.com/facebook/react/pull/10044), [#10039](https://github.com/facebook/react/pull/10039), [#10024](https://github.com/facebook/react/pull/10024), [#9264](https://github.com/facebook/react/pull/9264), and others.) -* [React DOM now allows passing non-standard attributes].(https://facebook.github.io/react/blog/2017/09/08/dom-attributes-in-react-16.html) ([@nhunzaker](https://github.com/nhunzaker) in [#10385](https://github.com/facebook/react/pull/10385), [10564](https://github.com/facebook/react/pull/10564), [#10495](https://github.com/facebook/react/pull/10495) and others) +* [React DOM now allows passing non-standard attributes](https://facebook.github.io/react/blog/2017/09/08/dom-attributes-in-react-16.html). ([@nhunzaker](https://github.com/nhunzaker) in [#10385](https://github.com/facebook/react/pull/10385), [10564](https://github.com/facebook/react/pull/10564), [#10495](https://github.com/facebook/react/pull/10495) and others) ### Breaking Changes - There are several changes to the behavior of scheduling and lifecycle methods: