Stable Release in branch 15.0
15.7.0
Released 14 Oct 2020
(5 years ago)
SoftwareReact
Version15.0
Initial release15.0.0
07 Apr 2016
(10 years ago)
Latest release15.7.0
14 Oct 2020
(5 years ago)
Security supportYes
Release noteshttps://github.com/facebook/react/blob/main/CHANGELOG.md
Source codehttps://github.com/facebook/react/tree/v15.7.0
Documentationhttps://react.dev
React 15.0 ReleasesView full list

What Is New in React 15.0?

React 15 focuses on stability and refinement, removing legacy code and improving compatibility with the web platform. The key updates are summarized below.

Category Key Changes
Initial Render Uses document.createElement instead of generating HTML strings. Reduces markup size and improves SVG support.
DOM Naming Standardizes DOM property and attribute names (e.g., className for SVG, htmlFor).
Error Handling Errors inside components no longer corrupt internal state. Errors are logged to console with component stack traces.
Component Return Values Components can now return null, strings, numbers, or arrays of elements from render.
Extraneous <span>s Fewer extraneous wrapper DOM nodes for components returning strings/numbers and in <textarea>.
Deprecations Removed deprecation warnings for LinkedStateMixin and React.createClass factory. These now work without warnings but are discouraged.
Add-ons New React Perf add-on for performance measurement. ReactTestUtils now works with any testing library that supports DOM rendering.

How did React 15 improve DOM rendering and compatibility?

The core rendering engine got a significant cleanup. Under the hood, React 15 now uses document.createElement for initial renders instead of setting innerHTML. This change brings React's output closer to standard DOM and eliminates a lot of historical workarounds.

In practice, this means generated HTML is cleaner with fewer redundant data attributes. It also unlocks better support for SVG and other non-HTML namespaces right out of the box. You'll see a smaller DOM footprint, which can matter for very large applications.

Standardized DOM Property Names

React now consistently uses the DOM API property names. For example, you use className and htmlFor for both HTML and SVG elements. This removes the mental overhead of remembering different attribute names for SVG.

// Works the same for both <div> and <svg>
<div className="foo" />
<svg className="bar" />

What changed with component return values and wrapper nodes?

Components gained more flexibility in what they can render. The render method can now return strings, numbers, arrays, or null directly.

// Returning a string
render() {
  return 'Hello World';
}
// Returning an array
render() {
  return [<li key="1"/>, <li key="2"/>];
}

This also reduced the number of extra <span> tags React generated internally. Components returning strings or numbers no longer get a wrapper span, and <textarea> children are handled more cleanly. This leads to a simpler, more predictable DOM tree.

How are errors handled differently in React 15?

Error handling is more robust. Previously, an error thrown during rendering could leave React's internal state corrupted. In React 15, errors are caught at a boundary, logged with a detailed component stack, and the internal state remains intact.

This means a bad component is more likely to fail in isolation without breaking the entire app. The error messages in the console are significantly better, showing the component hierarchy that led to the problem, which speeds up debugging.

What's new for developers using add-ons and testing?

The React Perf add-on was introduced as a standalone package. It gives you precise measurements for component renders, helping you identify performance bottlenecks in your app.

ReactTestUtils was decoupled from the specific testing framework. You can now use it with any library that can render to a real DOM, like Mocha or Tape, not just Jest. This gives teams more flexibility in their testing setup.

Deprecated Patterns

While the deprecated LinkedStateMixin and React.createClass factory still work, their warnings were removed. The team encourages moving to ES6 classes and managing form state manually for clearer code.

FAQ

Is React 15 a complete rewrite from React 0.14?
No, it's not a rewrite. React 15 is an incremental release that builds on 0.14. The major version bump signifies the removal of long-standing deprecations and a commitment to stability for the core API.

Do I need to change my code to upgrade from React 0.14?
Most existing code will work without changes. The breaking changes are minimal and focused on rarely used APIs and internal details. The upgrade path is designed to be smooth.

Why are there fewer extra <span> tags in the DOM now?
React's internal reconciliation process was refined. It no longer needs to wrap primitive return values (strings, numbers) in extra DOM nodes for bookkeeping, resulting in cleaner markup.

Can I use SVG attributes like `class` and `for` now?
No. React continues to use the DOM property names className and htmlFor for consistency across HTML and SVG. The improvement is that these names now work correctly in all contexts.

How do I measure performance in React 15?
Use the new react-addons-perf package. You can call Perf.start() and Perf.stop() around operations, then use methods like Perf.printWasted() to see which components re-rendered unnecessarily.

Releases In Branch 15.0

VersionRelease date
15.7.014 Oct 2020
(5 years ago)
15.6.226 Sep 2017
(8 years ago)
15.6.115 Jun 2017
(9 years ago)
15.6.013 Jun 2017
(9 years ago)
15.6.0-rc.101 Jun 2017
(9 years ago)
15.5.411 Apr 2017
(9 years ago)
15.5.208 Apr 2017
(9 years ago)
15.5.308 Apr 2017
(9 years ago)
15.5.007 Apr 2017
(9 years ago)
15.5.107 Apr 2017
(9 years ago)
15.5.0-rc.206 Apr 2017
(9 years ago)
15.5.0-rc.105 Apr 2017
(9 years ago)
15.4.206 Jan 2017
(9 years ago)
15.4.123 Nov 2016
(9 years ago)
15.4.016 Nov 2016
(9 years ago)
15.4.0-rc.314 Oct 2016
(9 years ago)
15.4.0-rc.414 Oct 2016
(9 years ago)
15.4.0-rc.205 Oct 2016
(9 years ago)
15.4.0-rc.104 Oct 2016
(9 years ago)
15.3.219 Sep 2016
(9 years ago)
15.3.2-rc.115 Sep 2016
(9 years ago)
15.3.119 Aug 2016
(9 years ago)
15.3.1-rc.215 Aug 2016
(9 years ago)
15.3.1-rc.112 Aug 2016
(9 years ago)
15.3.029 Jul 2016
(10 years ago)
15.3.0-rc.321 Jul 2016
(10 years ago)
15.3.0-rc.113 Jul 2016
(10 years ago)
15.3.0-rc.213 Jul 2016
(10 years ago)
15.2.108 Jul 2016
(10 years ago)
15.2.0-rc.201 Jul 2016
(10 years ago)
15.2.001 Jul 2016
(10 years ago)
15.2.0-rc.115 Jun 2016
(10 years ago)
15.1.020 May 2016
(10 years ago)
15.0.230 Apr 2016
(10 years ago)
15.0.108 Apr 2016
(10 years ago)
15.0.007 Apr 2016
(10 years ago)
15.0.0-rc.216 Mar 2016
(10 years ago)
15.0.0-rc.108 Mar 2016
(10 years ago)