React Hot Loader v3 "this component is not accepted by Hot Loader" error
See original GitHub issueAfter switching to React Hot Loader v3 I’m now getting the following error:
React Hot Loader: this component is not accepted by Hot Loader.
Please check is it extracted as a top level class, a function or a variable.
Click below to reveal the source location:
ƒ Connect(props, context) {
...
And the source is https://github.com/reactjs/react-redux/blob/master/src/components/connectAdvanced.js#L115
I was getting plenty of errors like this with my own code too until I updated everything to export each intermediate HOC as described in the React Hot Loader FAQ here: https://github.com/gaearon/react-hot-loader/blob/master/docs/Troubleshooting.md#react-hot-loader-this-component-is-not-accepted-by-hot-loader
Would you consider moving the Connect component outside of wrapWithConnect and exporting it? There’s really nothing functionally wrong with the code as it currently is, but this would help with hot module reloading, and clear up this annoying error message.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top Results From Across the Web
React Hot Loader v3. this component is not accepted by Hot ...
React Hot Loader: this component is not accepted by Hot Loader. Please check is it extracted as a top-level class, a function or...
Read more >React Hot Loader v3 "this component is not accepted ... - GitHub
After switching to React Hot Loader v3 I'm now getting the following error: React Hot Loader: this component is not accepted by Hot...
Read more >react-hot-loader - npm
Start using react-hot-loader in your project by running `npm i ... React-Hot-Loader would not update any object, including component state .
Read more >gaearon/react-hot-loader - Gitter
Im using webpack 2 and hot reloading (version 3) but when I change some file I get in console msg that app is...
Read more >this component is not accepted by Hot Loader-Reactjs
React Hot Loader v3. · React Hot Loader: this component is not accepted by Hot Loader · Component not reloaded with react hot...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m not sure what causes this issue, but if anyone else comes to this ticket via google, refactoring my app to look more like this example fixed it.
@pattiereaves I was just dealing with it and filtering it out in Chrome for a while and at some point it just stopped happening. I’m not sure what changed in my project to make these warnings go away, sorry 😕