Menu
React 17 makes upgrades easier

React 17 makes upgrades easier

Support for gradual updates in React 17 should make it safer to mix different versions of React in the same app

Credit: Benjamin Nelan via Pixabay

React 17, the latest version of the JavaScript UI library from Facebook, has arrived. The new release, designed to serve as a stepping stone, lacks any new developer-facing features but instead focuses on making upgrades easier.

Unveiled October 20, React 17 enables gradual React upgrades. When moving from React 15 to React 16 or from React 16 to React 17, users usually would upgrade the entire app at once. While this works well for many apps, it can be challenging if the codebase was written more than a few years ago and was not actively maintained.

Although it is possible to use two versions of React on the same web page, this has been fragile and has caused problems with events. Many of these problems are being fixed with React 17. Thus, when React 18 and subsequent versions are published, developers will be able to upgrade an app either all at once or piece by piece.

With React 17, it becomes safer to embed a tree managed by one version of React into a different version of the library. React 17 also makes it easier to embed React into apps that were built with other technologies.

To enable gradual updates, changes have been made to the React event system; these changes are potentially breaking. A FAQ has been published pertaining to stability.

In addition, React 17 introduces support for a new JSX transform, and that support is backported to older versions of React as well. The new transform is offered on an opt-in basis.

To install React 17 from NPM, you can use the following command:

npm install react@17.0.0 react-dom@17.0.0

From Yarn, use:

yarn add react@17.0.0 react-dom@17.0.0


Follow Us

Join the newsletter!

Or

Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.

Featured

Slideshows

Channel gathers to celebrate the Reseller News Innovation Awards 2020 winners

Channel gathers to celebrate the Reseller News Innovation Awards 2020 winners

More than 500 channel leaders gathered in Auckland on 21 October at the ​Reseller News Innovation Awards ​2020 to celebrate the achievements of the New Zealand technology industry's top partners, start-ups, vendors, distributors and individuals.

Channel gathers to celebrate the Reseller News Innovation Awards 2020 winners
Meet the winners of the 2020 Reseller News Innovation Awards

Meet the winners of the 2020 Reseller News Innovation Awards

Reseller News honoured the standout players of the New Zealand channel in front of more than 500 technology leaders in Auckland on 21 October, recognising the achievements of top partners, start-ups, vendors, distributors and individuals.

Meet the winners of the 2020 Reseller News Innovation Awards
Meet the Reseller News 30 Under 30 Tech Awards 2020 winners

Meet the Reseller News 30 Under 30 Tech Awards 2020 winners

This year’s Reseller News 30 Under 30 Tech Awards were held as an integral part of the first entirely virtual Emerging Leaders​ forum, an annual event dedicated to identifying, educating and showcasing the New Zealand technology market’s rising stars. The 30 Under 30 Tech Awards 2020 recognised the outstanding achievements and business excellence of 30 talented individuals​, across both young leaders and those just starting out. In this slideshow, Reseller News honours this year's winners and captures their thoughts about how their ideas of leadership have changed over time.​

Meet the Reseller News 30 Under 30 Tech Awards 2020 winners
Show Comments