Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bvaughn/73da9c832bef5dcaf1fcf9ea6528d94c to your computer and use it in GitHub Desktop.
Save bvaughn/73da9c832bef5dcaf1fcf9ea6528d94c to your computer and use it in GitHub Desktop.
Find out why React DevTools is showing the dev-build icon

Ever wonder why a particular website is showing a development build icon for React DevTools? Here's how you can find out!

First copy/paste this well-annotated DevTools build-type-checker function into your browser console so you can run it.

Next, execute the following line in your developer console:

console.log(__REACT_DEVTOOLS_GLOBAL_HOOK__._renderers);

If React is present on the page, you'll see something like:

{5b853225462e5: {…}}

Finally, pass the React renderer to the function we copy-pasted earlier and step through it to see why the development icon is being displayed:

debugger;
detectReactBuildType(__REACT_DEVTOOLS_GLOBAL_HOOK__._renderers['5b853225462e5']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment