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.

Brand Post

Featured

Slideshows

The Kiwi channel gathers for the 2020 Reseller News Women in ICT Awards

The Kiwi channel gathers for the 2020 Reseller News Women in ICT Awards

Hundreds of leaders from the New Zealand IT industry gathered at the Hilton in Auckland on 17 November to celebrate the finest female talent in the Kiwi channel and recognise the winners of the Reseller News Women in ICT Awards (WIICTA) 2020.

The Kiwi channel gathers for the 2020 Reseller News Women in ICT Awards
Leading female front runners honoured at the 2020 Reseller News Women in ICT Awards

Leading female front runners honoured at the 2020 Reseller News Women in ICT Awards

The leading female front runners of the New Zealand ICT industry joined together for the annual Reseller News Women in ICT Awards event at the Hilton in Auckland, during which hundreds of guests celebrated 13 outstanding individuals who won awards, chosen from more than 50 finalists representing over 30 organisations.

Leading female front runners honoured at the 2020 Reseller News Women in ICT Awards
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
Show Comments