This repository has been archived by the owner on Aug 5, 2019. It is now read-only.
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.
This Pull Request updates dependency react-dom from
^15.6.1
to^16.0.0
Release Notes
v16.0.0
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 returnnull
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 callingsetState
from render.setState
callback (second argument) now fires immediately aftercomponentDidMount
/componentDidUpdate
instead of after all components have rendered.<A />
with<B />
,B.componentWillMount
now always happens beforeA.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 theref
later, when applying the changes to the DOM.ReactDOM.unmountComponentAtNode
. See this example.componentDidUpdate
lifecycle no longer receivesprevContext
param. (@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_batchedUpdates
now only takes one extra argument after the callback.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.hydrate
instead ofReactDOM.render
if you're reviving server rendered HTML. Keep usingReactDOM.render
if you're just doing client-side rendering.Removed Deprecations
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.v16.1.0
Discontinuing Bower Releases
Starting with 16.1.0, we will no longer be publishing new releases on Bower. You can continue using Bower for old releases, or point your Bower configs to the React UMD builds hosted on unpkg that mirror npm releases and will continue to be updated.
All Packages
React
React.Children
utilities. (@MatteoVH in #11378)render
method but doesn't extend a known base class. (@sw-yx in #11168)React DOM
on
as a custom attribute for AMP. (@nuc in #11153)onMouseEnter
andonMouseLeave
firing on wrong elements. (@gaearon in #11164)null
showing up in a warning instead of the component stack. (@gaearon in #10915)tabIndex
not getting applied to SVG elements. (@gaearon in #11034)dangerouslySetInnerHTML
in IE. (@OriR in #11108)form.reset()
to respectdefaultValue
on uncontrolled<select>
. (@aweary in #11057)<textarea>
placeholder not rendering on IE11. (@gaearon in #11177)<dialog>
element. (@gaearon in #11035)componentDidReceiveProps
method. (@iamtommcc in #11479)contentEditable
andchildren
. (@Ethan-Arrowood in #11208)select
gets nullvalue
. (@Hendeca in #11141)React DOM Server
suppressHydrationWarning
attribute for intentional client/server text mismatches. (@sebmarkbage in #11126)autoFocus
attribute into SSR markup. (@gaearon in #11192)React Test Renderer and Test Utils
setState()
calls incomponentWillMount()
in shallow renderer. (@Hypnosphi in #11167)shouldComponentUpdate()
afterforceUpdate()
. (@d4rky-pl in #11239 and #11439)forceUpdate()
andReact.PureComponent
correctly. (@koba04 in #11440)package.json
dependency. (@gaearon in #11340)React ART
package.json
dependency. (@gaearon in #11341)react-art/Circle
,react-art/Rectangle
, andreact-art/Wedge
. (@gaearon in #11343)React Reconciler (Experimental)
React Call Return (Experimental)
v16.1.1
React
React DOM
capture
attribute. (@maxschmeling in #11424)React DOM Server
ReactDOMServer
public API. (@travi in #11531)autoFocus={false}
attribute on the server. (@gaearon in #11543)React Reconciler
v16.2.0
React
Fragment
as named export to React. (@clemmy in #10783)React.Children
utilities. (@MatteoVH in #11422)React DOM
onChange
event in some cases. (@jquense in #11028)React Test Renderer
setState()
callback firing too early when called fromcomponentWillMount
. (@accordeiro in #11507)React Reconciler
react-reconciler/reflection
with utilities useful to custom renderers. (@rivenhk in #11683)Internal Changes
v16.3.0
React
React.createRef()
API as an ergonomic alternative to callback refs. (@trueadm in #12162)React.forwardRef()
API to let components forward their refs to a child. (@bvaughn in #12346)React.Fragment
. (@XaveScor in #11823)React.unstable_AsyncComponent
withReact.unstable_AsyncMode
. (@acdlite in #12117)setState()
on an unmounted component. (@sophiebits in #12347)React DOM
getDerivedStateFromProps()
lifecycle andUNSAFE_
aliases for the legacy lifecycles. (@bvaughn in #12028)getSnapshotBeforeUpdate()
lifecycle. (@bvaughn in #12404)<React.StrictMode>
wrapper to help prepare apps for async rendering. (@bvaughn in #12083)onLoad
andonError
events on the<link>
tag. (@roderickhsiao in #11825)noModule
boolean attribute on the<script>
tag. (@aweary in #11900)onKeyPress
in more browsers. (@nstraub in #10514)value
anddefaultValue
to ignore Symbol values. (@nhunzaker in #11741)opera
with anull
value. @alisherdavronov in #11854)<option selected>
. (@watadarkstar in #11821)ReactDOM.unstable_createPortal()
in favor ofReactDOM.createPortal()
. (@prometheansacrifice in #11747)React DOM Server
React.Component
. (@wyze in #11993)this.state
of different components getting mixed up. (@sophiebits in #12323)v16.3.1
React
Fragment
. (@heikkilamarko in #12504)setState()
in constructor. (@gaearon in #12532)React DOM
getDerivedStateFromProps()
not getting applied in some cases. (@acdlite in #12528)Create Subscription
v16.3.2
React
null
orundefined
toReact.cloneElement
. (@nicolevy in #12534)React DOM
<StrictMode>
. (@bvaughn in #12546)unstable_observedBits
API with nesting. (@gaearon in #12543)React Test Renderer
Commits
v16.3.0
c2c3c0c
Fix build script to handle react-is (no peer deps) (#12471)488ad5a
Fix typo in create-subscription readmec1b21a7
Added DEV warning if getSnapshotBeforeUpdate is defined as a static method (#12475)268a3f6
Add unstable APIs for async rendering to test renderer (#12478)c44665e
Fix bug when fatal error is thrown as a result of `batch.commit` (#12480)7a833da
setState() in componentDidMount() should flush synchronously even with createBatch() (#12466)5855e9f
Improve warning message for setState-on-unmounted (#12347)15e3dff
Don't bail out on referential equality of Consumer's props.children function (#12470)125dd16
Update user timing to record the timeout deadline with 'waiting' events (#12479)96fe3b1
Add React.isValidElementType() (#12483)53fdc19
Updated react-is README to show new isValidElementType()8650d2a
Disable createRoot for open source builds (#12486)6294b67
unstable_createRoot (#12487)b2379d4
Updating package versions for release 16.3.09778873
Updating dependencies for react-noop-renderer8e3d94f
Update bundle sizes for 16.3.0 releasev16.3.1
2c3f5fb
Add React 16.3.0 changelog (#12488)4304475
Fix links18ba36d
Move context API in Changelog to "React" section59b3905
Fix method name in changelogfa8e678
Change create-subscription's peerDep on react to ^16.3.0 (#12496)0c80977
Validate React.Fragment props without Map. (#12504)59dac9d
Fix DEV performance regression by avoiding Object.assign on Fibers (#12510)6b99c6f
Add missing changelog item7a27ebd
Update user timing to record when we are about to commit (#12384)4ccf58a
Fix context stack misalignment caused by error replay (#12508)6f2ea73
Extract throw to separate function so performUnitOfWork does not deopt (#12521)ba245f6
Prefix _context property on returned ReactContext from createContext - it's private (#12501)eb6e752
Bumped create-subscription package version (#12526)da4e855
Remove @providesModule in www bundles (#12529)0f2f90b
getDerivedStateFrom{Props,Catch} should update updateQueue.baseState (#12528)36c2939
Improve not-yet-mounted setState warning (#12531)a2cc3c3
Follow up: make new warning less wordy (#12532)2279843
Updating yarn.lock file for 16.3.1 release787b343
Updating package versions for release 16.3.1dc05957
Update bundle sizes for 16.3.1 releaseb15b165
Changelog for 16.3.1v16.3.2
1c2876d
Add a build step to hoist warning conditions (#12537)5e3706c
Don't render bitmask-bailing consumers even if there's a deeper matching child (#12543)e932e32
facebook.github.io/react -> reactjs.org (#12545)d328e36
Removed duplicate typeof check (#12541)8ec0e4a
Removed Array.from() usage (#12546)27535e7
Clarify ReactDOM's case warning for html tags (#12533)7a3416f
Expose component stack from reactTag to React Native renderer (#12549)cf649b4
Move TouchHistoryMath to React Native repo (#12557)5b16b39
Bug fix6bf2797
Remove flushSync from React Native (#12565)bc753a7
Support findNodeHandle in Fabric (#12573)181747a
[RN] Move takeSnapshot to RN (#12574)20c5d97
Keep consistency in the comment (#12579)ea37545
Must be a before PlacementAndUpdate (#12580)76b4ba0
Preserve error codes for invariants on www (#12539)8dfb057
Unfork invariant and instead use it from reactProdInvariant (#12585)f88deda
Throw more specific error if passed undefined in React.cloneElement (#12534)2f7bca0
Allocate unique reactTags for RN and Fabric (#12587)933f882
Remove ReactNativePropRegistry (#12559)40d0772
[RN] Remove unstable_batchedUpdates and unmountComponentAtNodeAndRemoveContainer from Fabric (#12571)b6e0512
Consolidate eventTypes registry with view configs (#12556)b99d0b1
[RN] Move view config registry to shims (#12569)725c054
Refactor findHostInstance and findNodeHandle (#12575)52afbe0
createReactNativeComponentClass needs to be CommonJS3eae866
Fixes language in error message. (#12590)b846152
Added UMD build to test renderer package (#12594)3e9515e
Remove @providesModule in www shims915bb53
Bump expiration for interactive updates to 150ms in production (#12599)c27a998
[Danger] Minor fixes (#12606)5dfbfe9
Fixed debug performance labels for new component types (#12609)1591c8e
Update GCC (#12618)a4cef29
tests: add regression test for reading ReactCurrentOwner stateNode (#12412)2e1cc28
Fix small typos in create-subscription readme (#12399)1e97a71
Fix documentation of the release process (#12337)66c44a7
Updating yarn.lock file for 16.3.2 release82f67d6
Updating package versions for release 16.3.26494f6b
Update error codes for 16.3.2 release3232616
Update bundle sizes for 16.3.2 release01402f4
Add 16.3.2 changelog (#12621)This PR has been generated by Renovate Bot.