New React version promises near-native performance

Version 16 of Facebook's JavaScript library for building UIs will feature the Fiber reconciliation algorithm

Facebook's plans for its React JavaScript library include rewriting the library's internals to improve visual performance and make web apps more like native ones.

The React 16 upgrade will feature Fiber, a new reconciliation algorithm that improves responsiveness. GitHub notes on React written in January say, "Fiber gives us a solid foundation to improve React core in numerous ways.... We intend to ship it with React 16 by default."

A presentation on Fiber given last fall by Facebook React core team member Andrew Clark stressed the intention to use Fiber to bring web apps closer to native mobile app performance.

React 16 will exclude some APIs whose usage is not recommended, such as helpers for React.createClass and React.Dom, from the default build in order to reduce bundle size. They will still be available as separate packages if developers want them. To have greater control over bundles for better optimization, React builders have been considering a switch to flat bundles and removing access to React internals in react/lib/* and react-dom/lib/*. "This will also mean faster compile times by default for users of Webpack and other bundlers, and faster server-side rendering performance," the notes state.

In the meantime, Facebook has released React 15.5.0, with new deprecation warnings. React.PropTypes and React.createClass have been extracted into their own packages. Both remain accessible via the main React object, but using either will log a one-time deprecation warning to the console when in development mode.

Also, React addons packages support, covering such packages as react-addons-create-fragment, is being discontinued. "In truth, most of these packages haven't been actively maintained in a long time," said Clark. "They will continue to work indefinitely, but we recommend migrating away as soon as you can to prevent future breakages."

React 15.5.0 also migrates from React.PropTypes, which provide for runtime validation of props while in development. "We've extracted the built-in prop types to a separate package to reflect the fact that not everybody uses them," Clark said. Migration from React.createClass is featured as well.

Join the newsletter!

Error: Please check your email address.

More about Facebook

Show Comments
[]