At WWDC 2009, Apple had made a bold announcement. One that was unprecedented in the personal computing industry. Apple had announced that Snow Leopard, their latest Mac OS X, would have 0 new features. After 3.5 years in the works, Apple decided to emphasize “refinements” instead of new features. In their own words -

“Rather than focusing primarily on new features, Snow Leopard will enhance the performance of OS X, set a new standard for quality and lay the foundation for future OS X innovation.”

11 years later, and 2.5 years after the version 16 release, React seems to have followed in similar footsteps. The React 17 release announcement uniquely headlined that it does not ship with any visible new features.

"The React 17 release is unusual because it doesn’t add any new developer-facing features. Instead, this release is primarily focused on making it easier to upgrade React itself. React 17 is a 'stepping stone' release."

React has been rock-solid at ensuring complete backward compatibility with older versions. This avoids costly and time-consuming rewrites when migrating to a newer version. The Angular fiasco being a case in point.

React 17 decided to focus primarily on a different aspect of DX (Developer Experience) - Making version upgrades easier. Below are the 3 primary “refinements” introduced in React 17:

  • Gradual Updates - Almost always, when migrating to a newer version, the entire app needs to be upgraded at one go. All-or-nothing, without anything in between. From React 18 onwards, it would also be possible to upgrade each piece of the application gradually, if so desired. This feature is completely optional. It is expected to be often used by apps with large codebases to ensure that they do not get left behind.
  • Event Delegation Changes - To support gradual updates, React's event delegation model had to be changed. React 17 will start attaching event handlers to the root DOM container, instead of the earlier document-level event handlers. This change would make it easier to embed or intermingle React into apps built with other technologies like jQuery or Angular. Additionally, event propagation in React 17 now works closer to the regular DOM.
  • New JSX Transform - To allow browsers to understand and execute JSX, most React users leverage compiler like Babel or TypeScript to transform JSX code into regular JavaScript. React 17 offers a new, backward-compatible rewritten version of the JSX transform. Because of this, primarily, JSX can now be used without having to import React, leading to potentially even smaller bundle sizes. Thoughtfully, a code mod has also been included, which removes existing react imports -
  npx react-codemod update-react-imports

This will remove all default React imports, primarily the below line from all files in the application -

  import React from 'react'

The new JSX transform simplifies how React.createElement works and ultimately will remove the need for using forwardRef.

React 17 is aimed at making React more stable and easier to upgrade. Apple's Snow Leopard OS was the gold standard of software releases and has reached a legendary status in the Apple community. Could this new release achieve the same for React?