Skip to content

Releases: facebook/react

v15.2.1

08 Jul 22:45
Compare
Choose a tag to compare

React

  • Fix errant warning about missing React element. (@gaearon in #7193)
  • Better removal of dev-only code, leading to a small reduction in the minified production bundle size. (@gaearon in #7188, #7189)

React DOM

  • Add stack trace to null input value warning. (@jimfb in #7040)
  • Fix webcomponents example. (@jalexanderfox in #7057)
  • Fix unstable_renderSubtreeIntoContainer so that context properly updates when linked to state. (@gaearon in #7125)
  • Improve invariant wording for void elements. (@starkch in #7066)
  • Ensure no errors are thrown due to event handlers in server rendering. (@rricard in #7127)
  • Fix regression resulting in value-less submit and reset inputs removing the browser-default text. (@zpao in #7197)
  • Fix regression resulting in empty name attribute being added to inputs when not provided. (@okonet in #7199)
  • Fix issue with nested server rendering. (@Aweary in #7033)

React Perf Add-on

  • Make ReactPerf.start() work properly during lifecycle methods. (@gaearon in #7208).

React CSSTransitionGroup Add-on

  • Fix issue resulting in spurious unknown property warnings. (@batusai513 in #7165)

React Native Renderer

  • Improve error handling in cross-platform touch event handling. (@yungsters in #7143)

v15.2.0

01 Jul 19:03
Compare
Choose a tag to compare

React

  • Add error codes to production invariants, with links to the view the full error text. (@keyanzhang in #6948)
  • Include component stack information in PropType validation warnings. (@spicyj in #6771)
  • Include component stack information in key warnings. (@keyanzhang in #6799)
  • Stop validating props at mount time, only validate at element creation. (@keyanzhang in #6823)
  • New invariant providing actionable error in missing instance case. (@yungsters in #6990)
  • Add React.PropTypes.symbol to support ES2015 Symbols as props. (@puradox in #6377)
  • Fix incorrect coercion of ref or key that are undefined in development (@gaearon in #6880)
  • Fix a false positive when passing other element’s props to cloneElement (@ericmatthys in #6268)

React DOM

  • Add warning for unknown properties on DOM elements. (@jimfb in #6800, @gm758 in #7152)
  • Properly remove attributes from custom elements. (@grassator in #6748)
  • Fix invalid unicode escape in attribute name regular expression. (@nbjahan in #6772)
  • Add onLoad handling to <link> element. (@roderickhsiao in #6815)
  • Add onError handling to <source> element. (@wadahiro in #6941)
  • Handle value and defaultValue more accurately in the DOM. (@jimfb in #6406)
  • Fix events issue in environments with mutated Object.prototype. (@Weizenlol in #6886)
  • Fix issue where is="null" ended up in the DOM in Firefox. (@darobin in #6896)
  • Improved performance of text escaping by using escape-html. (@aickin in #6862)
  • Fix issue with dangerouslySetInnerHTML and SVG in Internet Explorer. (@joshhunt in #6982)
  • Fix issue with <textarea> placeholders. (@jimfb in #7002)
  • Fix controlled vs uncontrolled detection of <input type="radio"/>. (@jimfb in #7003)
  • Improve performance of updating text content. (@trueadm in #7005)
  • Ensure controlled <select> components behave the same on initial render as they do on updates. (@yiminghe in #5362)

React Perf Add-on

React CSSTransitionGroup Add-on

React Native Renderer

  • Dependencies on React Native modules use CommonJS requires instead of providesModule. (@davidaurelio in #6715)

v15.1.0

20 May 23:18
Compare
Choose a tag to compare

React

  • Ensure we're using the latest object-assign, which has protection against a non-spec-compliant native Object.assign. (@zpao in #6681)
  • Add a new warning to communicate that props objects passed to createElement must be plain objects. (@richardscarrott in #6134)
  • Fix a batching bug resulting in some lifecycle methods incorrectly being called multiple times. (@spicyj in #6650)

React DOM

  • Fix regression in custom elements support. (@jscissr in #6570)
  • Stop incorrectly warning about using onScroll event handler with server rendering. (@Aweary in #6678)
  • Fix grammar in the controlled input warning. (@jakeboone02 in #6657)
  • Fix issue preventing <object> nodes from being able to read <param> nodes in IE. (@syranide in #6691)
  • Fix issue resulting in crash when using experimental error boundaries with server rendering. (@jimfb in #6694)
  • Add additional information to the controlled input warning. (@borisyankov in #6341)

React Perf Add-on

  • Completely rewritten to collect data more accurately and to be easier to maintain. (@gaearon in #6647, #6046)

React Native Renderer

v15.0.2

30 Apr 00:42
Compare
Choose a tag to compare

React

  • Removed extraneous files from npm package. (@gaearon in #6388)
  • Ensure componentWillUnmount is only called once. (@jimfb in #6613)

ReactDOM

  • Fixed bug resulting in disabled buttons responding to mouse events in IE. (@nhunzaker in #6215)
  • Ensure <option>s are correctly selected when inside <optgroup>. (@trevorsmith in #6442)
  • Restore support for rendering into a shadow root. (@Wildhoney in #6462)
  • Ensure nested <body> elements are caught when warning for invalid markup. (@keyanzhang in #6469)
  • Improve warning when encountering multiple elements with the same key. (@hkal in #6500)

React TestUtils Add-on

  • Ensure that functional components do not have an owner. (@gaearon in #6362)
  • Handle invalid arguments to scryRenderedDOMComponentsWithClass better. (@ipeters90 in #6529)

React Perf Add-on

  • Ignore DOM operations that occur outside the batch operation. (@gaearon in #6516)

React Native Renderer

  • These files are now shipped inside the React npm package. They have no impact on React core or ReactDOM.

v15.0.1

08 Apr 18:33
Compare
Choose a tag to compare

React

  • Restore React.__spread API to unbreak code compiled with some tools making use of this undocumented API. It is now officially deprecated. (@zpao in #6444)

ReactDOM

  • Fixed issue resulting in loss of cursor position in controlled inputs. (@spicyj in #6449)

v15.0.0

08 Apr 16:05
Compare
Choose a tag to compare

Major changes

  • Initial render now uses document.createElement instead of generating HTML. Previously we would generate a large string of HTML and then set node.innerHTML. At the time, this was decided to be faster than using document.createElement for the majority of cases and browsers that we supported. Browsers have continued to improve and so overwhelmingly this is no longer true. By using createElement we can make other parts of React faster. (@spicyj in #5205)
  • data-reactid is no longer on every node. As a result of using document.createElement, we can prime the node cache as we create DOM nodes, allowing us to skip a potential lookup (which used the data-reactid attribute). Root nodes will have a data-reactroot attribute and server generated markup will still contain data-reactid. (@spicyj in #5205)
  • No more extra <span>s. ReactDOM will now render plain text nodes interspersed with comment nodes that are used for demarcation. This gives us the same ability to update individual pieces of text, without creating extra nested nodes. If you were targeting these <span>s in your CSS, you will need to adjust accordingly. You can always render them explicitly in your components. (@mwiencek in #5753)
  • Rendering null now uses comment nodes. Previously null would render to <noscript> elements. We now use comment nodes. This may cause issues if making use of :nth-child CSS selectors. While we consider this rendering behavior an implementation detail of React, it's worth noting the potential problem. ()@spicyj in #5451)
  • Functional components can now return null. We added support for defining stateless components as functions in React 0.14. However, React 0.14 still allowed you to define a class component without extending React.Component or using React.createClass(), so we couldn’t reliably tell if your component is a function or a class, and did not allow returning null from it. This issue is solved in React 15, and you can now return null from any component, whether it is a class or a function. (@jimfb in #5884)
  • Improved SVG support. All SVG tags are now fully supported. (Uncommon SVG tags are not present on the React.DOM element helper, but JSX and React.createElement work on all tag names.) All SVG attributes that are implemented by the browsers should be supported too. If you find any attributes that we have missed, please let us know in this issue. (@zpao in #6243)

Breaking changes

  • No more extra <span>s.
  • React.cloneElement() now resolves defaultProps. We fixed a bug in React.cloneElement() that some components may rely on. If some of the props received by cloneElement() are undefined, it used to return an element with undefined values for those props. We’re changing it to be consistent with createElement(). Now any undefined props passed to cloneElement() are resolved to the corresponding component’s defaultProps. (@truongduy134 in #5997)
  • ReactPerf.getLastMeasurements() is opaque. This change won’t affect applications but may break some third-party tools. We are revamping ReactPerf implementation and plan to release it during the 15.x cycle. The internal performance measurement format is subject to change so, for the time being, we consider the return value of ReactPerf.getLastMeasurements() an opaque data structure that should not be relied upon. (@gaearon in #6286)

Removed deprecations

These deprecations were introduced nine months ago in v0.14 with a warning and are removed:

  • Deprecated APIs are removed from the React top-level export: findDOMNode, render, renderToString, renderToStaticMarkup, and unmountComponentAtNode. As a reminder, they are now available on ReactDOM and ReactDOMServer. (@jimfb in #5832)
  • Deprecated addons are removed: batchedUpdates and cloneWithProps. (@jimfb in #5859, @zpao in #6016)
  • Deprecated component instance methods are removed: setProps, replaceProps, and getDOMNode. (@jimfb in #5570)
  • Deprecated CommonJS react/addons entry point is removed. As a reminder, you should use separate react-addons-* packages instead. This only applies if you use the CommonJS builds. (@gaearon in #6285)
  • Passing children to void elements like <input> was deprecated, and now throws an error. (@jonhester in #3372)
  • React-specific properties on DOM refs (e.g. this.refs.div.props) were deprecated, and are removed now. (@jimfb in #5495)

New deprecations, introduced with a warning

Each of these changes will continue to work as before with a new warning until the release of React 16 so you can upgrade your code gradually.

  • LinkedStateMixin and valueLink are now deprecated due to very low popularity. If you need this, you can use a wrapper component that implements the same behavior: react-linked-input. (@jimfb in #6127)
  • Future versions of React will treat <input value={null}> as a request to clear the input. However, React 0.14 has been ignoring value={null}. React 15 warns you on a null input value and offers you to clarify your intention. To fix the warning, you may explicitly pass an empty string to clear a controlled input, or pass undefined to make the input uncontrolled. (@antoaravinth in #5048)
  • ReactPerf.printDOM() was renamed to ReactPerf.printOperations(), and ReactPerf.getMeasurementsSummaryMap() was renamed to ReactPerf.getWasted(). (@gaearon in #6287)

New helpful warnings

  • If you use a minified copy of the development build, React DOM kindly encourages you to use the faster production build instead. (@spicyj in #5083)
  • React DOM: When specifying a unit-less CSS value as a string, a future version will not add px automatically. This version now warns in this case (ex: writing style={{'{{'}}width: '300'}}. Unitless number values like width: 300 are unchanged. (@pluma in #5140)
  • Synthetic Events will now warn when setting and accessing properties (which will not get cleared appropriately), as well as warn on access after an event has been returned to the pool. (@kentcdodds in #5940 and @koba04 in #5947)
  • Elements will now warn when attempting to read ref and key from the props. (@prometheansacrifice in #5744)
  • React will now warn if you pass a different props object to super() in the constructor. (@prometheansacrifice in #5346)
  • React will now warn if you call setState() inside getChildContext(). (@raineroviir in #6121)
  • React DOM now attempts to warn for mistyped event handlers on DOM elements, such as onclick which should be onClick. (@ali in #5361)
  • React DOM now warns about NaN values in style. (@jontewks in #5811)
  • React DOM now warns if you specify both value and defaultValue for an input. (@mgmcdermott in #5823)
  • React DOM now warns if an input switches between being controlled and uncontrolled. (@TheBlasfem in #5864)
  • React DOM now warns if you specify onFocusIn or onFocusOut handlers as they are unnecessary in React. (@jontewks in #6296)
  • React now prints a descriptive error message when you pass an invalid callback as the last argument to ReactDOM.render(), this.setState(), or this.forceUpdate(). (@conorhastings in #5193 and @gaearon in [#6310](htt...
Read more

v0.14.8

29 Mar 17:35
Compare
Choose a tag to compare

React

  • Fixed memory leak when rendering on the server

v0.14.7

28 Jan 20:26
Compare
Choose a tag to compare

React

  • Fixed bug with <option> tags when using dangerouslySetInnerHTML
  • Fixed memory leak in synthetic event system

React TestUtils Add-on

  • Fixed bug with calling setState in componentWillMount when using shallow rendering

v0.14.6

06 Jan 23:56
Compare
Choose a tag to compare

React

  • Updated fbjs dependency to pick up change affecting handling of undefined document.

v0.14.5

06 Jan 23:57
Compare
Choose a tag to compare

React

  • More minor internal changes for better compatibility with React Native