Facebook rolls out React 15 upgrade to JavaScript library

The latest version features DOM improvements and full SVG backing

Facebook is offering a stable release of React v15.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.

Join the TechWorld newsletter!

Error: Please check your email address.

More about Facebook

Show Comments

Market Place

[]