52

Anyone know why the ReactJS Chrome browser extension isn't showing for mein dev tools? It's installed, at one point it was working.

I'm using chrome Version 39.0.2171.65 (64-bit) on Mac OS X v 10.7.5

I read the reviews on this extension, some people said need to expose React as a global. I'm using React NPM with: var React = require('react');

Giant Elk
  • 5,375
  • 9
  • 43
  • 56
  • 3
    you should set `window.React`, please see http://stackoverflow.com/questions/26347489/react-dev-tools-not-loading-in-chrome-browser – nilgun Nov 20 '14 at 08:31

11 Answers11

79

In chrome://extensions/ select Allow access to file URLs for the React Developer Tools extension, using v0.13.1 of React. I didn't need to add anything to my source code.

Giant Elk
  • 5,375
  • 9
  • 43
  • 56
  • 8
    Check for ⚛️ Components tab and ⚛️ Profiler tab in newer version. Facebook have updated React DevTools to have Components and Profiler Tabs it serves same purpose as React tab in older versions. – Shailesh Sep 06 '20 at 09:45
  • 1
    @Shailesh you should write this as an answer. – Shekhar Sahu Jan 13 '22 at 05:15
77

I was having this issue just now and to solve it I had to open dev tools -> click the gear icon on the top right of the dev tools window then in the far right column at the very bottom is a button that should say "restore defaults and reload" click that. I was not able to figure out the exact reason it was not appearing but it at least gets react debugging working again.

AndrewBrntt
  • 1,152
  • 11
  • 21
27

Just happened to me on Chrome 100. Reloading the page, reopening DevTools panel, toggling the extension on/off, restarting the browser and closing other app windows didn't help.

What fixed it for me was: CMD+SHIFT+P and selecting "Reload DevTools" from the command panel. For non-Macs it will probably be CTRL+SHIFT+P.

krukid
  • 4,285
  • 5
  • 31
  • 30
14

React extension shows up only when you have react loaded into the browser in global scope. Like @nlgndg mentions it should be present as window.React

Dhruva Sagar
  • 7,089
  • 1
  • 25
  • 34
  • 1
    Copy Paste from other answer: The main requirement is that window.React is set. If you're using a module system (as I am using Browserify): `typeof window !== "undefined" && (window.React = React)` This should usually be done in your main source file. – Giant Elk Nov 27 '14 at 20:36
  • I have given him due credit for the answer, just thought it's better served as an answer for everyone to see than a comment. – Dhruva Sagar Feb 03 '15 at 17:30
  • 7
    Thanks , just typed window.React = {} in the console and the React tab became visible in the chrome dev tools besides the audits tab . – Siddharth Sharma May 07 '16 at 15:38
6

Restarting Chrome after installation seems to help, apart from the other answers.

I couldn't find any info on that step in the Chrome Web Store or when clicking on the plugin, so just leaving it here.

Voy
  • 5,286
  • 1
  • 49
  • 59
2

TOW SIMPLE STEPS

1. in devTools (inspect of page) press ALT + R

it will fix the problem if did not

2. Allow access to file URLs to React Developer Tools

STEPS :

a.Extensions

b.React Developer Tools (details btn)

c.check Allow access to file URLs

https://github.com/facebook/react/blob/main/packages/react-devtools/README.md#the-react-tab-shows-no-components

Sky
  • 291
  • 4
  • 5
1

I was using http://localhost:3000, I went to extensions and reset the settings like toggle them and it started showing components and profiler tabs for me.. I dont know thats a solution, but it worked for me.. PS Also updated chrome version too.

pmax
  • 26
  • 1
1

As others have suggested, I tried re-installing the extension, the solution with CMD+SHIFT+P, clicking gear icon then "restore default and load", still it did not work.

I don't know if this is what fixed it but I changed the dock side from right to bottom and reloaded the page and I could see the "⚛️ Components" tab after that.

Shubham Dhingra
  • 186
  • 3
  • 13
0

In case none of the answers helped, try to open the extension's settings and check the option Site access. The value should be on all sites. In case of on click or on specific sites the tabs won't showing up

lloydbanks
  • 63
  • 7
0

Recently, ReactJS stopped working in my browser. The problem was that one of my extensions got updated and was interfering with the other one. If you have this problem, try disabling all extensions except the one you need.

-2

i had the same problem . and it was solved just like @Siddharth Sharma said . open the console and create a react object just like bellow .

window.react = {};
Geco
  • 177
  • 1
  • 17