React DevTools changelog


4.27.2

February 16, 2023


4.27.1

December 6, 2022


4.27.0

November 28, 2022

Features

Bugfixes


4.26.1

October 13, 2022


4.26.0

September 16, 2022


4.25.0

July 13, 2022


4.24.7

May 31, 2022


4.24.6

May 12, 2022


4.24.5

May 5, 2022


4.24.4

April 8, 2022


4.24.3

March 29, 2022

Bugfix


4.24.2

March 24, 2022

Bugfix


4.24.1

March 15, 2022

Bugfix


4.24.0

March 10, 2022

Feature

Bugfix

Misc

Breaking change

Technically this is a breaking change for projects using react-devtools-inline, but since this package already depends on the experimental release channel, we are going to include it in 4.24.


4.23.0

January 24, 2022

Feature

Bugfix

Misc


4.22.1

December 14, 2021


4.22.0

December 13, 2021

A note for React Native users

React DevTools has two main pieces:

This release updates the protocol that DevTools uses to communicate between the "frontend" and "backend" components.

Because React Native embeds a copy of the React DevTools "backend" (react-devtools-core/backend), the "frontend" (UI) needs to match. This means you may be prompted to upgrade (or downgrade) your React DevTools based on which version of React Native your app uses.

Features

Bugfix

Misc


4.21.0

October 31, 2021

Features

Bugfix

Misc


4.20.2

October 20, 2021

Bugfix


4.20.1

October 19, 2021

Bugfix


4.20.0

October 15, 2021

Features

Bugfix

Misc


4.19.2

October 8, 2021

Bugfix


4.19.1

October 1, 2021

Bugfix


4.19.0

September 29, 2021

Features

Bugfix

Performance


4.18.0

September 1, 2021

Features


Bugfix


4.17.0

August 24, 2021

Features

Bugfix


4.16.0

August 16, 2021

Features

Bugfix


4.15.0

August 11, 2021

Features

Bugfix

Misc

Scheduling profiler
What is React working on?

React’s previous Profiler primarily reports how fast (or slow) components are when rendering. It didn’t provide an overview of what React is doing (the actual cooperative scheduling bits). The new profiler does. It shows when components schedule state updates and when React works on them. It also shows how React categorizes and prioritizing what it works on.

Here’s a profile for a simple app that uses only the legacy (synchronous) ReactDOM.render API. The profiler shows that all of the work scheduled and rendered by this app is done at synchronous priority:

https://user-images.githubusercontent.com/29597/129042321-56985f5a-264e-4f3a-a8b7-9371d75c690f.mp4

Here’s a more interesting profile for an app that’s rendered at default priority using the new createRoot API, then updates synchronously in response to an “input” event to manage a "controlled component":

https://user-images.githubusercontent.com/29597/129074959-50912a63-0215-4be5-b51b-1e0004fcd2a1.mp4

Here’s part of a profile showing an idle app (no JavaScript running). In this case, React does some pre-rendering work for components that are “offscreen” (not currently displayed).

https://user-images.githubusercontent.com/29597/128971757-612f232f-c64f-4447-a766-66a0516e8f49.mp4

Note that “offscreen” refers to a new API and set of features that we haven’t talked about much yet except for some passing references. We’ll talk more about it in future posts.

What are “transitions” and how do they work?

We recently shared an update about the new startTransition API. This API helps apps feel responsive even when there are large updates by splitting the work into (1) a quick update to show that the app has received some input and (2) a slower update (the “transition”) that actually does any heavy lifting needed as a result of the input.

Here is an example profile that uses the transition API. First React renders a small update that shows the user some visual feedback (like updating a controlled component or showing an inline loading indicator). Then it renders a larger update that, in this case, computes some expensive value.

https://user-images.githubusercontent.com/29597/129079176-0995c8c0-e95a-4f44-8d55-891a7efa35c0.mp4

How does Suspense impact rendering performance?

You may have heard mention of “suspense” in past talks or seen it referenced in our docs. Although full support for data fetching via Suspense is expected to be released sometime after React 18.0, you can use Suspense today for things like lazy-loading React components. The new profiler shows when components suspend during render and how that impacts overall rendering performance.

Here’s an example profile that suspends during the initial render to lazy-load a component using React.lazy. While this component is loading, React shows a “fallback“ (placeholder UI). Once the component finishes loading, React retries the render and commits the final UI.

https://user-images.githubusercontent.com/29597/129054366-2700e7e8-0172-4f61-9453-475acd740456.mp4

We plan to expand support for Suspense in the coming weeks to more explicitly show when suspense fallbacks are rendered and which subsequent renders are related to an initial update that suspended.

What else might cause a render to get delayed?

Suspense can cause a render to get delayed as React waits for data to load, but React can also get stuck waiting on a lot of JavaScript to run.

React profiling tools have previously focused on only reporting what React (or React components) are doing, but any JavaScript the browser runs affects performance. The new profiler shows non-React JavaScript as well, making it easy to see when it delays React from rendering.

https://user-images.githubusercontent.com/29597/128971952-7c4e7e11-f4fb-497e-b643-4d9b3994b590.mp4

What can you do to improve performance?

Until now, DevTools (and the Profiler) has provided information without commentary. The new profiler takes a more active approach– highlighting where we think performance can be improved and providing suggestions.

For example, suspending during an update is generally a bad user experience because it causes previously shown components to be unmounted (hidden) so the fallback can be shown while data loads. This can be avoided using the new Transition API. If you forget to add a transition to an update that suspends, the new profiler will warn you about this:

https://user-images.githubusercontent.com/29597/128972228-3b23f01a-8017-43ad-b371-975ffed26c06.mp4

The new profiler also warns about scheduling a long, synchronous React update inside of event handler.

https://user-images.githubusercontent.com/29597/128972000-d7477ba3-b779-46f2-b141-aaa712e9d6d2.mp4

Another thing the new profiler will warn about is long-running renders scheduled from layout effects (useLayoutEffect or componentDidMount/componentDidUpdate). These updates (called “nested updates”) are sometimes necessary to adjust layout before the browser paints, but they should be fast. Slow nested updates make the browser feel unresponsive.

https://user-images.githubusercontent.com/29597/128972017-3ed0e682-751c-46fb-a6c5-271f255c8087.mp4


4.14.0

July 17, 2021

Features

Display hook names for inspected components

DevTools parsing hook names

Control for manually toggling error boundaries

DevTools error boundary toggle


4.13.5

May 25, 2021

Bugfix


4.13.4

May 20, 2021

Bugfix


4.13.3

May 19, 2021

Misc

Bugfix


4.13.2

May 7, 2021

Misc


4.13.1

April 28, 2021

Bugfix

Misc


4.13.0

April 28, 2021

Features

Bugfix

Bridge protocol version backend/frontend

During initialization, DevTools now checks to ensure it's compatible with the "backend" that's embedded within a renderer like React Native. If the two aren't compatible, upgrade instructions will be shown:

Dialog displaying downgrade instructions for the React DevTools frontend to connect to an older backend version Dialog displaying upgrade instructions for the React DevTools frontend to connect to a newer backend version

Learn more about this change at fb.me/devtools-unsupported-bridge-protocol


4.12.4

April 19, 2021

Bugfix


4.12.3

April 19, 2021

Bugfix


4.12.2

April 16, 2021

Bugfix


4.12.1

April 14, 2021 Although this release is being made for all NPM packages, only the react-devtools-inline package contains changes.

Bugfix


4.12.0

April 12, 2021 Although this release is being made for all NPM packages, only the react-devtools-inline package contains changes.

Features


4.11.1

April 11, 2021

Bugfix


4.11.0

April 9, 2021

Bugfix

Features

Experimental features

The following features are only enabled when used with (experimental) builds of React:

Improve Profiler commit-selector UX

Video demonstrating tooltip with commit duration and time

Graphic illustrating Profiler bar heights using different scales

Expose DEV-mode warnings in devtools UI

Inline warnings and errors

Shows which fibers scheduled the current update

Shows which fibers scheduled the current update

Add commit and post-commit durations to Profiler UI

Add commit and post-commit durations to Profiler UI

Show which hooks (indices) changed when profiling

Show which hooks (indices) changed when profiling


4.10.4

May 20, 2021

Bugfix


4.10.3

April 27, 2021

Bugfix


4.10.2

April 27, 2021

Features


4.10.1

November 12, 2020

Bugfix


4.10.0

November 12, 2020

Features

Bugfix


4.9.0

October 19, 2020

Features

Bugfix


Other

Improved DevTools editing interface

Improved parsing Value parsing logic has been relaxed so as to no longer require quotes around strings or double quotes: looser parsing logic

Modifying arrays New values can be added to array props/state/hooks now. Existing values can also be deleted: adding and removing values from an array

Modifying objects New keys can be added to object props/state/hooks now. Existing keys can be renamed or deleted entirely: adding/renaming/removing object properties


4.8.2

July 15, 2020

Bugfix


4.8.1

July 10, 2020

Bugfix


4.8.0

July 9, 2020

Features

Bugfix


4.7.0

May 18, 2020

Features

Bugfix


4.6.0

March 26, 2020

Features

Bugfix

Cleanup


4.5.0

March 3, 2020

Features

Bugfix

Info summary tooltips

Profiler tooltips in Flamegraph chart

Profiler tooltips in Ranked chart

Components panel resize

Horizontal Components panel resizing

Vertical Components panel resizing


4.4.0

January 3, 2020

Features

Bugfix


4.3.0

December 20, 2019

Features

Bug fixes


4.2.1

November 27, 2019

Bug fixes


4.2.0

October 3, 2019

Features


4.1.3

September 30, 2019

Bug fixes


4.1.2

September 27, 2019

Bug fixes


4.1.1

September 26, 2019

Bug fixes


4.1.0

September 19, 2019

Features

Bug fixes


4.0.6

August 26, 2019

Bug fixes


4.0.5

August 19, 2019

Bug fixes


4.0.4

August 18, 2019

Bug fixes


4.0.3

August 17, 2019

Bug fixes


4.0.2

August 15, 2019

Permissions cleanup


4.0.1

August 15, 2019

Permissions cleanup


4.0.0

August 15, 2019


General changes

Improved performance

The legacy DevTools extension used to add significant performance overhead, making it unusable for some larger React applications. That overhead has been effectively eliminated in version 4.

Learn more about the performance optimizations that made this possible.

Component stacks

React component authors have often requested a way to log warnings that include the React "component stack". DevTools now provides an option to automatically append this information to warnings (console.warn) and errors (console.error).

Example console warning with component stack added

It can be disabled in the general settings panel:

Settings panel showing "component stacks" option


Components tree changes

Component filters

Large component trees can sometimes be hard to navigate. DevTools now provides a way to filter components so that you can hide ones you're not interested in seeing.

Component filter demo video

Host nodes (e.g. HTML <div>, React Native View) are now hidden by default, but you can see them by disabling that filter.

Filter preferences are remembered between sessions.

No more inline props

Components in the tree no longer show inline props. This was done to make DevTools faster and to make it easier to browse larger component trees.

You can view a component's props, state, and hooks by selecting it:

Inspecting props

"Rendered by" list

In React, an element's "owner" refers to the thing that rendered it. Sometimes an element's parent is also its owner, but usually they're different. This distinction is important because props come from owners.

Example code

When you are debugging an unexpected prop value, you can save time if you skip over the parents.

DevTools v4 adds a new "rendered by" list in the right hand pane that allows you to quickly step through the list of owners to speed up your debugging.

Example video showing the "rendered by" list

Owners tree

The inverse of the "rendered by" list is called the "owners tree". It is the list of things rendered by a particular component- (the things it "owns"). This view is kind of like looking at the source of the component's render method, and can be a helpful way to explore large, unfamiliar React applications.

Double click a component to view the owners tree and click the "x" button to return to the full component tree:

Demo showing "owners tree" feature

No more horizontal scrolling

Deeply nested components used to require both vertical and horizontal scrolling to see, making it easy to "get lost" within large component trees. DevTools now dynamically adjusts nesting indentation to eliminate horizontal scrolling.

Video demonstration dynamic indentation to eliminate horizontal scrolling

Improved hooks support

Hooks now have the same level of support as props and state: values can be edited, arrays and objects can be drilled into, etc.

Video demonstrating hooks support

Improved search UX

Legacy DevTools search filtered the components tree to show matching nodes as roots. This made the overall structure of the application harder to reason about, because it displayed ancestors as siblings.

Search results are now shown inline similar to the browser's find-in-page search.

Video demonstrating the search UX

Higher order components

Higher order components (or HOCs) often provide a custom displayName following a convention of withHOC(InnerComponentName) in order to make it easier to identify components in React warnings and in DevTools.

The new Components tree formats these HOC names (along with several built-in utilities like React.memo and React.forwardRef) as a special badge to the right of the decorated component name.

Screenshot showing HOC badges

Components decorated with multiple HOCs show the topmost badge and a count. Selecting the component shows all of the HOCs badges in the properties panel.

Screenshot showing a component with multiple HOC badges

Restoring selection between reloads

DevTools now attempts to restore the previously selected element when you reload the page.

Video demonstrating selection persistence

Suspense toggle

React's experimental Suspense API lets components "wait" for something before rendering. <Suspense> components can be used to specify loading states when components deeper in the tree are waiting to render.

DevTools lets you test these loading states with a new toggle:

Video demonstrating suspense toggle UI


Profiler changes

Reload and profile

The profiler is a powerful tool for performance tuning React components. Legacy DevTools supported profiling, but only after it detected a profiling-capable version of React. Because of this there was no way to profile the initial mount (one of the most performance sensitive parts) of an application.

This feature is now supported with a "reload and profile" action:

Video demonstrating the reload-and-profile feature

Import/export

Profiler data can now be exported and shared with other developers to enable easier collaboration.

Video demonstrating exporting and importing profiler data

Exports include all commits, timings, interactions, etc.

"Why did this render?"

"Why did this render?" is a common question when profiling. The profiler now helps answer this question by recording which props and state change between renders.

Video demonstrating profiler "why did this render?" feature

Because this feature adds a small amount of overhead, it can be disabled in the profiler settings panel.

Component renders list

The profiler now displays a list of each time the selected component rendered during a profiling session, along with the duration of each render. This list can be used to quickly jump between commits when analyzing the performance of a specific component.

Video demonstrating profiler's component renders list