Skip to content

[DevTools] Ignore new production renderers if we already use "worse" versions of React on a page#35994

Open
eps1lon wants to merge 2 commits intofacebook:mainfrom
eps1lon:sebbie/03-10-_devtools_ignore_new_production_renderers_if_we_already_use_worse_versions_of_react_on_a_page
Open

[DevTools] Ignore new production renderers if we already use "worse" versions of React on a page#35994
eps1lon wants to merge 2 commits intofacebook:mainfrom
eps1lon:sebbie/03-10-_devtools_ignore_new_production_renderers_if_we_already_use_worse_versions_of_react_on_a_page

Conversation

@eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Mar 10, 2026

Summary

When a new build of React is detected on the screen, React DevTools will display a special icon and extension popup for this build. This helps discover if a page is accidentally using a development build.

However, right now the last seen React build is considered. This can hide if a React development build on the page is used.

Now we keep the seen React builds in state and only change the icon/popup if we see a new, worse React builds. Worse is is just any non-production build.

Originally reported in vercel/next.js#90744

How did you test this change?

  • Start a Next.js app in dev (e.g. npm run dev next) to ensure the development build icon is used
    CleanShot 2026-03-10 at 18 44 40@2x

@meta-cla meta-cla bot added the CLA Signed label Mar 10, 2026
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Mar 10, 2026
@react-sizebot
Copy link

Comparing: 014138d...209a41c

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.84 kB 6.84 kB = 1.88 kB 1.88 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 611.79 kB 611.79 kB = 108.12 kB 108.12 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.84 kB 6.84 kB = 1.88 kB 1.88 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 677.72 kB 677.72 kB = 119.08 kB 119.08 kB
facebook-www/ReactDOM-prod.classic.js = 697.67 kB 697.67 kB = 122.58 kB 122.58 kB
facebook-www/ReactDOM-prod.modern.js = 687.98 kB 687.98 kB = 120.96 kB 120.96 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 209a41c

@eps1lon eps1lon requested a review from hoxyq March 10, 2026 18:42
@eps1lon eps1lon marked this pull request as ready for review March 10, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants