BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

Facebook Releases React 16

| by David Iffland Follow 3 Followers on Sep 27, 2017. Estimated reading time: 1 minute |

Facebook has released version 16 of React, adding some welcome features and performance improvements. The only difference this time around is that they completely rewrote React.

Andrew Clark, front-end engineer at Facebook, announced the release of React 16 in a blog post, showcasing some new features such as render fragments and improved error handling. While these are interesting features that developers will surely take full advantage of, the big news with React 16 is that it has been rewritten.

In a write-up on the "how" of the architecture change, Sophie Alpert, engineering manager at Facebook, says that "it's a bit like swapping out the engine of a running car":

We've completely rewritten the internals of React while keeping the public API essentially unchanged ... Since hundreds of other companies (including Facebook) use React in production every day, we wanted to do the swap without forcing people to rewrite their components built in React.

The team used feature flags so that work on React Fiber was done alongside the non-Fiber version. Using a combination of unit tests and running the new code in production on facebook.com and messenger.com, the team could slowly eliminate defects and boost the functionality of the new renderer.

Of course, no major rewrite is perfect and developers can expect some breaking changes. Clarks says that they "only affect uncommon use cases and we don't expect them to break most apps."

React 16 is available on npm, yarn, and UMD builds. As reported on InfoQ, version 16 is now MIT licensed. Developers not moving to version 16 right away can upgrade to version 15.6.2 which also contains the relicensing.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT