React 17.0 — The news is that there is no news

Discover the new version change of ReactJS and why there is no news at the moment

Gradual updates

The updates that React has introduced in recent times have often involved the introduction of “deprecations” of old functionality, causing development teams to often have problems introducing these new updates, especially in large applications.

Changes to the event system

Although until now it was not impossible to have multiple versions of React running in our application, this used to cause numerous headaches because of the way React handles events. For example, the Atom code editor encountered a problem related to this almost 4 years ago:

<button onClick={handleClick}>
someButton.addEventListener('click', handleClick);
const rootNode = document.getElementById('root');
ReactDOM.render(<App />, rootNode);// React < 17
document.addEventListener()// React >= 17

useEffect cleanUp

Another very important change in this new version of React is the time when the declared effects are cleaned up through the useEffect hook:

useEffect(function() {
return function cleanUp() {
// Its cleanup

More “minor” changes

Although the two previous changes are the most important for me, React 17 introduces another series of changes that I want to mention at least in passing in case they affect your applications:

  • From now on if we use the forwardRef or memo functions and the component returns undefined, React will treat this as an error.
  • And finally the generation of the component stack has been modified so that now it is easier to know which component produced the error.

Do you want to try React 17?

If you have been curious and want to start testing this new version of React, you can do so by installing it through yarn:

yarn add react@17.0.0-rc.0 react-dom@17.0.0-rc.0

Final thoughts

As you can see, this version 17 of ReactJS does not introduce any novelty in terms of features. However, I am sure that the foundations have been laid so that when new versions begin to be released we will have more than interesting surprises that I will comment on here.

Entre paseo y paseo con Simba desarrollo en Symfony y React

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store