-
Notifications
You must be signed in to change notification settings - Fork 46.1k
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
React Developer Tools not showing correct components #17683
Comments
I think this is a misunderstanding 😄 From that screenshot, it looks like React DevTools is showing your components. The component names have just been minified. This is because the "name" of your component is just the name of the function. Most JavaScript projects are configured to minify the names of functions and variables as part of the production build process- so that the resulting code is smaller and downloads faster. This means that a component named For example- assuming you're using create-react-app (just a guess) it's configured to preserve display names only in development mode. |
@bvaughn How do I undo this configuration? |
Can't say, since I don't know anything about your app. I would recommend against doing this in production mode though. It's generally a good idea to minify your JavaScript 😄 |
Looks like your webpack is in production mode. You can fix this by changing your webpack.config.js, from: |
Hello everyone. |
Do you want to request a feature or report a bug?
Report a Bug
What is the current behavior?
![image](https://user-images.githubusercontent.com/31084854/71300980-0f63ef80-2368-11ea-9fbe-63cddea97bc0.png)
The React Developer Tools, when I deploy a React App to GitHub Pages, do not show the React components. The Components tab instead displays
#16840 told me to use that extension but that doesn't work
Update:
![image](https://user-images.githubusercontent.com/31084854/71315713-d2fcc600-2431-11ea-9315-ef6a6925f8cd.png)
I uninstalled and reinstalled React and now I get a blank screen. Additionally, when run on localhost (development build) it shows the right components.
On localhost, it shows the development mode, and I see what I want to see on production mode:
What is the expected behavior?
The React Developer Tools should show the components.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
on Google Chrome, React v4.2.1
The text was updated successfully, but these errors were encountered: