Why Should You Upgrade to React 17

Naveen DA
3 min readNov 16, 2020

--

Introduction

React 17 got released a few ago with no new features but still, you need to upgrade your react version because React is developed by the community. So that testing should be done by the community.

Create React App supports React 17

A few days ago create-react-app 4.0 is released with a bunch of improvements including the react-17.

This is a good time to upgrade your react version.

You might know that the react-17 has no features for developers but still, you need to update you existing react version to 17.

No Features? Why Need to Update?

A react is not fully maintained by Facebook, it was also maintained by the tons of developer around the world. It was a community effort, they might do code by sacrificing their weekends, nights of sleep, etc.

When you read the React-17 Changelog you will find 63 improvements/bug fixing. We must be valued their work because we all are in the same community and this how an open-source community works.

3 months ago, Dan Abramov asked us to test the react-17. When that time React-17 was Release Candidate, now it was released officially and got shipped with create-react-app.

If we still not upgrade the React17, it might become a problem for the React Maintainers and for us too.

How to update the react version for an existing app

Just run the npm command

npm install react@17.0.0 react-dom@17.0.0

It will upgrade your react version to 17

New Application

For the new application, you don’t need to do anything new. Just run the npx command as usual.

npx create-react-app new-app

Now features, then why they release

React 17 has no feature for the developers but it got tones of feature for the React itself.

Few of thems are

  1. Gradual Upgrades

React 17 enable us to upgrade the whole application or some part.

2. Changes to Event Delegation

In React 17, React will no longer attach event handlers at the document level under the hood.

https://reactjs.org/blog/2020/10/20/react-v17.html

3. New JSX Transform

React 17 supports new JSX Transform

Conclusion

As the React.JS was developed by the community, the testing should be done

Thank you for reading!

If you liked this, consider following me on Twitter, and sharing the article with your developer friends 🐋😀

--

--

Naveen DA
Naveen DA

No responses yet