-
Notifications
You must be signed in to change notification settings - Fork 801
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
"The following modules couldn't be hot updated: (Full reload needed)" - updated to 3.0 #409
Comments
Yeah there's a few changes needed, see here for an upgrade guide. |
Thanks @calesce, got it working <3. One question though, what does "react-hot-loader/babel" do in .babelrc? Because this change broke my acceptance tests:
I was trying to debug this, tho' the problem was gone when I removed it from .babelrc, and hot reloading still works fine. Thanks! |
The babel plugin also does some magic to make class properties able to be reloaded, because they're otherwise hidden to
Are you using async class properties? That looks like the same issue as #391, hopefully we'll resolve that soon. |
@calesce well i will keep using it without the babel plugin and see if something doesn't work. We don't really use any async class properties afaik, and the only test that failed was one that uses keyDown event dispatching, which is, in fact, an async class property:
Cheers, fox. |
@calesce I've found one file where we use a async class property, and hot reloading works fine with this component even without the babel plugin.
Maybe this will help in debugging the issue. |
Hmmm, does the
You won't need React Hot Loader if your components don't have state or lifecycle hooks. The reason the Login example works without the Babel plugin is that it completely remounts the component using regular Webpack HMR. You can test that by adding Also, you can use the Webpack loader ( |
I want to add a one thing: There should be a way to detect and guide the users to do the setting up right:
There is so much new in there. I've tried react-hot-loader 3 couple of times, but it didn't guide me in anyway so I thought it was not working with my setup yet. It turned out to be that I just needed to throw this new stuff in there. Ideally it should somehow detect that user is still trying to use the old way:
Which just doesn't work anymore. |
@Ciantic I agree it's confusing, but the plan is to have the quick setup guide (currently on next-docs) on the README. Also yeah, it would be beneficial to check via the babel plugin/webpack loader whether a module using If you want to write up a PR I'd be happy to look at it. |
Going to close this out because the original issue was resolved, and the async issue is tracked in #391. |
If you are reporting a bug or having an issue setting up React Hot Loader, please fill in below. For feature requests, feel free to remove this template entirely.
Description
What you are reporting: No component is being live updated after update to 3.0
Expected behavior
What you think should happen: Components should hot reload
Actual behavior
What actually happens: They don't, instead a message -
is shown.
Environment
React Hot Loader version: "react-hot-loader": "^3.0.0-beta.6",
Run these commands in the project folder and fill in their results:
node -v
: v4.4.2npm -v
: v3.8.5Then, specify:
I've only updated the react hot loader, not webpack itself. We still use WP 1.13.0. It was working fine before the update, is there any new configuration needed?
Thanks
The text was updated successfully, but these errors were encountered: