Upgrading react 0.14 to 15
Breaking0.14.10 → 15.7.0Breaking13Deprecated11New52Changed53Fixed107Other7
BreakingUpgrade verdict
13 breaking changes.
In plain terms
- The main React package no longer bundles React DOM inside it, so code that relied on that hidden copy must import React DOM separately.
- The data-reactid attribute is no longer added to every element. Root elements now get data-reactroot instead, and server-rendered markup still has data-reactid.
- React no longer wraps text in extra span elements. If your CSS targeted those spans, you need to adjust it or render them explicitly.
- React no longer adds extra span elements around text.
Must act Top 5 of 24 that need code or config changes
Adds create-react-class ^15.6.0, loose-envify ^1.1.0, object-assign ^4.1.0, prop-types ^15.5.10.
Drops envify.
Installs 19 packages in all (was 42).
What you must change
Breaking13
The React package and browser build no longer secretly include React DOM.
Removes data-reactid from every node; root nodes get data-reactroot and server markup still contains data-reactid.
data-reactiddata-reactrootRemoves extra span elements; plain text nodes are now interspersed with comment nodes for demarcation.
Removes extra span elements, a breaking change for code or CSS relying on them.
Removes deprecated findDOMNode, render, renderToString, renderToStaticMarkup and unmountComponentAtNode from the React top-level export.
findDOMNoderenderrenderToStringrenderToStaticMarkupunmountComponentAtNodeReactDOMReactDOMServerRemoves deprecated addons batchedUpdates and cloneWithProps.
batchedUpdatescloneWithPropsRemoves deprecated component instance methods setProps, replaceProps and getDOMNode.
setPropsreplacePropsgetDOMNodeRemoves the deprecated CommonJS react/addons entry point; use separate react-addons-* packages instead.
react/addonsreact-addons-*Removes React-specific properties on DOM refs such as this.refs.div.props.
refsthis.refs.div.propsRendering null now uses comment nodes instead of noscript elements, which may affect :nth-child CSS selectors.
React.cloneElement() now resolves undefined props to the component's defaultProps, consistent with createElement().
React.cloneElement()createElement()defaultPropsReactPerf.getLastMeasurements() return value is now opaque and should not be relied upon.
ReactPerf.getLastMeasurements()Passing children to void elements like input now throws an error instead of warning.
childrenDeprecations to plan for
Deprecated11
Adds a deprecation warning for React.createClass, pointing users to create-react-class.
React.createClasscreate-react-classAdds deprecation warnings and a separate module for React.DOM factory helpers.
React.DOMWarns for deprecation of the React.createMixin helper, which was never used.
React.createMixinAdds a deprecation warning for React.createClass, pointing users to create-react-class instead.
React.createClassAdds a deprecation warning for React.PropTypes, pointing users to prop-types instead.
React.PropTypesMarks this as the last release for addons, which will no longer be actively maintained.
Deprecates react-addons-test-utils in favor of react-dom/test-utils and react-test-renderer/shallow.
react-addons-test-utilsreact-dom/test-utilsreact-test-renderer/shallowRestores the undocumented React.__spread API to unbreak code compiled with some tools, and officially deprecates it.
React.__spreadDeprecates LinkedStateMixin and valueLink with a warning; they keep working until React 16.
LinkedStateMixinvalueLinkWarns on null input value; future versions will treat value={null} as a request to clear the input.
valueRenames ReactPerf.printDOM() to printOperations() and getMeasurementsSummaryMap() to getWasted().
ReactPerf.printDOM()ReactPerf.printOperations()ReactPerf.getMeasurementsSummaryMap()ReactPerf.getWasted()