react-router icon indicating copy to clipboard operation
react-router copied to clipboard

React dev tools don't work with the examples

Open justin808 opened this issue 12 years ago • 7 comments

Recently, it's necessary to add

window.React = require("react");

However, that basically kills the browser due to some browserify error. So I'm not sure what the fix is.

The situation is that you can install the react dev tools in chrome, but they don't show up. Here's what you should see:

reactjs___refluxjs_ _todomvc

justin808 avatar Sep 07 '14 08:09 justin808

Does this issue have anything to do with react-router?

KyleAMathews avatar Sep 14 '14 23:09 KyleAMathews

I'm not having any issues. I'm using the react-router and I don't have to add the window.React line.

I'm using:

OSX: 10.9.4
React Developer Tools: 0.8.1
Chrome: 37.0.2062.120
"browserify": "5.10.0"
"react": "~0.11.0"
"react-router": "~0.5.2"
"console-shim": "^1.0.3"
"es5-shim": "^4.0.1"

iamrandys avatar Sep 14 '14 23:09 iamrandys

@justin808 any updates?

ryanflorence avatar Sep 17 '14 01:09 ryanflorence

Hi @rpflorence. I'm pretty sure that it's necessary to expose window.React to enable the React Developer tools. @iamrandys, do you see the React tab in the chrome tools?

justin808 avatar Sep 17 '14 08:09 justin808

Works for me too (the tab shows up). I guess this is because require('react') is being checked as well (which works thanks to browserify). At least that's what's mentioned here.

agundermann avatar Sep 17 '14 11:09 agundermann

Yes, it works on linux as well. @taurose is right, I've probably never had any issues since I'm using browserify, but that's what @justin808 said he is using. To see if it's the page or the react plugin, you can always go to the react home page and test the react plugin there. If that works, then it has something to do with the page you are creating.

iamrandys avatar Sep 17 '14 11:09 iamrandys

This is just a webpack + dev tools thing, not us. Thanks for the issue, hopefully others will find it too.

https://coderwall.com/p/sg4zbq

ryanflorence avatar Sep 17 '14 14:09 ryanflorence