question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React Hot Loader v3 "this component is not accepted by Hot Loader" error

See original GitHub issue

After 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:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
pattiereavescommented, Nov 14, 2017

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.

0reactions
dizlexikcommented, Nov 10, 2017

@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 😕

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found