-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
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
withStyles throws "React Hot Loader: this component is not accepted by Hot Loader." #8821
Comments
The hot reloading doesn't work on the root component for some reason. I does for nested component. I don't think that we can do anything about it here. I'm closing the issue for gaearon/react-hot-loader#666 |
Thanks @oliviertassinari! Confirmed workaround: - "react-hot-loader": "^3.1.1",
+ "react-hot-loader": "3.0.0-beta.7", Update: Downgrading |
@Glavin001 Notice that you can disable the warnings. Looks like most people are doing so. |
Warnings are there for a reason 😉 . These warnings are justified as it does not work. My workaround currently remove |
@Glavin001 It's good to hear it. So it seems to be related to the |
I'm running in the exact same problem. Warning + state lost everytimes I rebuild when using Here's a zip of that test project |
After some tests, I found something interesting. This explains why |
@rrousselGit What could explain such behavior? It sounds like an happy heuristic. |
@oliviertassinari Seems like it is a limitation in react-hot-loader
https://github.com/gaearon/react-hot-loader#components-not-replaced Which also implies that you can't do
So far, the best "hot-reload" setup with
But like I told you on gitter, this doesn't work when you change the style passed to |
@oliviertassinari Given the fact React-Hot-Loader explicit states these components -- which are not exported, such as is with |
For the export thing, it seems that this is an issue with RHL 3.x For the styling issue, I think I found the problem. A stateful hot reload is most likely updating withStyles props instead of using a new instance. Would be a good idea to reopen this issue, to take a look at this. Should be an easy fix. |
I've tested it and I can confirm this theory. But the problem is that Adding
to |
@rrousselGit Oh wow, I have never seen react-hot-loader behaving this way. It would be awesome if you could create a reproduction repository so I can write a proper fix. I want to make sure we don't introduce any memory leak nor degrading performance. |
Sure. There's the fix for withRoot (exporting everything) included |
There is also a bit context on this in their Troubleshooting which is basically what @rrousselGit found. Doing their suggesting in my project did help and made the warning go away but it still appears from time to time (due to some other external components probably). |
Hello, could someone say me what I am doing wrong or issue with hot reloader warnings still exists in latest build? material-ui-icons@^1.0.0-beta.17:
resolved "https://registry.yarnpkg.com/material-ui-icons/-/material-ui-icons-1.0.0-beta.17.tgz#5f19af54a2d99eeef347a55414a6853e1c850dc3"
material-ui@v1.0.0-beta.24:
resolved "https://registry.yarnpkg.com/material-ui/-/material-ui-1.0.0-beta.24.tgz#a51452d0486f88fd7f13ebed869793f298aa800c" |
any updates on this issue? using next@5 which uses "react-hot-loader": "4.0.0-beta.18", having the same issue, with next@4 all works fine |
@sarkistlt Do you have a reproduction repository? |
Expected Behavior
Current Behavior
Steps to Reproduce (for bugs)
Use https://github.com/Glavin001/react-hot-ts/tree/material-ui-demo to reproduce with the above steps.
Context
I loose usage of React Hot Loader when adding Material UI to my project.
Your Environment
The text was updated successfully, but these errors were encountered: