- Notifications
You must be signed in to change notification settings - Fork 49.8k
Make devtools warning disappear if installed #953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super nit-picky, but I believe we use single quotes for 'undefined' everywhere else.
On another note, would it not make sense to always display the message (appended with for Chrome unless the global is defined), unless __react_devtools__ is defined, that way, people who prefer IE or FF are still made aware of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad. At KA we use double quotes so I get mixed up when switching.
My guess is users of other browsers would find that annoying.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, we opted to just show it to people in the browser we support. When we get a FF extension (who wants to write it with me?), we'll show the message there too.
Otherwise, I think we should just market the extension more strongly on the site so that people with other browsers know that Chrome+extension is an option.
| We're going to do this a different way. |
| Is there any way to get around this problem atm? |
@spicyj can you elaborate? |
| I would suggest to remove the warning completely. There is no need to warn, since react works perfectly fine without the dev tools. The docs are the right place to tell people about them. |
| Logging is actually really helpful for "just in time" advertising - people open the devtools to debug something and see the message. It should go away if installed but it's not too terribly annoying right now so it hasn't been a priority. |
| I guess without a little bit of spam this wouldn't be facebook. My way around it is a plugin for webpack. From my webpack.config.js: new webpack.DefinePlugin({ 'console.debug': function(text){ if (text.indexOf('Download the React DevTools') !== 0) console.debug(text); } }) |
| Can you reword it to "If you haven't already, download.." for now, if there's no way to detect its installation? |
| It isn't a "warning" if it always appears. Perhaps it would be better to remove the warning altogether? (That's what I'll do in my local copy.) |
| Please consider removing the warning all together. It's very distracting to developers who monitor the console very closely. |
| For those not following along in master, this should be fixed now. Latest devtools + React v0.12 will be quiet if you already have the tools installed. |
| I installed the latest extension few days back, it was working good, however, dont see the plugin anymore in devtools. When Ioad my app, I see this on the console " Download the React DevTools for a better development experience" |
| @sahas- You're sure you're using React 0.12? |
| @gaearon - it says Version: 0.12.1. I did pull it down from Chrome store.. |
| @sahas- I meant React's version, not extension's |
| yep, here is what I see |
| any suggestions? |
| Maybe you are opening a page via |
| Thanks. I'm running the app using mongoose web server locally. It did work a week ago but stopped for some reason. |
| I find this message to be distracting to my dev process. How do I turn it off? I don't have react-devtools installed and I'm not interested in playing with it right now... |
| As an Angular dev consuming a 3rd party React plugin (Help Scout Beacons), I'd rather not see this message ever... I guess I will submit an issue to the plugin provider, as well. Reminds me of: https://code.google.com/p/google-cast-sdk/issues/detail?id=309 Its not good advertising... |
| We're using https://www.npmjs.com/package/zombie for some headless ui testing and this message pops up all the time. We're having react components there (which are tested by JEST in a different step) as well but in that scenario we explicitly don't want to use the React DevTools. I agree with @OR13, not a very good place for advertising... |
| Seconded. How can we disable this warning? I'm using a library (auth0-lock) and that library is including React. I'm not using React myself and I have no interest in installing the React DevTools. |
| Thirded. |
| +1 I'm not even a React developer, and this message is incredibly distracting when working on my own project, but it's caused by some browser extension using React. If someone is using React and you want them to use DevTools, make it blatantly obvious in the docs instead of spamming every developer's console who isn't even using it. |
| +1 still seeing this. |
Depends on facebook/react-devtools#23 to be useful.