Paul Krill
Editor at Large

Facebook rolls out React 15 upgrade to JavaScript library

news
Apr 8, 20162 mins

The latest version features DOM improvements and full SVG backing

Facebook is offering a stable release of React 15.0, the latest version of the company’s highly touted JavaScript library for developing UIs, highlighted by improvements for the DOM (document object model) and SVG (scalable vector graphics).

As part of its virtual DOM effort, version 15 supports all SVG attributes recognized by today’s browsers. “Historically our support for SVG has been incomplete, and many tags and attributes were missing. We heard you,” said Dan Abramov, a software engineer at Facebook. React now includes the full SVG specification.

Version 15 eliminates extra <span> nodes around text, thanks to a community contribution. This provides for cleaner DOM output.

React also now uses the document.createElement function when mounting components, thereby getting rid of the data-reactid attribute on every node and making the DOM lighter. Use of document.createElement also is faster in modern browsers and fixes edge case related to SVG elements and having multiple copies of React on the same page. “As a bonus, thanks to using document.createElement, we no longer need to maintain a list of SVG tags, so any SVG tags that were previously unsupported should work just fine in React 15.”

Also known as React.js, React has been centered on using components for building applications. It has been lauded for its efficiency, tooling, and SEO friendliness. Facebook recently outlined intentions to improve performance, gesture capabilities and developer experience in the library.

Version 15 brings with it a new naming scheme. The previous version was 0.14.7. Facebook made the switch to indicate it has already been using React in production.

For installation of version 15, Facebook advises using React from NPM, leveraging a tool like browserify or webpack to build code into a single bundle. To improve the community contribution process, Facebook plans to introduce an RFC process based on Ember RFCs, thus offering external contributors more insight and influence in development of React.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author