Paul Krill
Editor at Large

New React version promises near-native performance

news
Apr 17, 20172 mins

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

hyper drive light speed fast speeding
Credit: Thinkstock

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.

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