Skip to content
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

render never called after a hot reload - how do I debug this #1346

Closed
RobertGary1 opened this issue Sep 19, 2019 · 4 comments
Closed

render never called after a hot reload - how do I debug this #1346

RobertGary1 opened this issue Sep 19, 2019 · 4 comments

Comments

@RobertGary1
Copy link

# Expected behavior

The render method should be called after a component is updated. I can see that the source code as been updated but if I put a break point on render() its never called. The DOM does not update correctly.
What you think should happen:

Actual behavior

What actually happens:

Environment

React Hot Loader version:
4.12.13
Run these commands in the project folder and fill in their results:

  1. node -v:
    v10.16.3

  2. npm -v:
    6.9.0
    Then, specify:

  3. Operating system:
    Chrome

@theKashey
Copy link
Collaborator

Could you please try 4.12.12? It might be #1342

@RobertGary1
Copy link
Author

No, I'm still seeing it. Oddly I see the console log that its updating. And if I look at the source code in the browser its correctly updated. Its just not calling the render to update the DOM. This was working before, I must have messed up some configuration.

@RobertGary1
Copy link
Author

I fixed it In index.js I changed
import {App} from './App';
to
import App from './App';

My guess is that it was loading the class App directly bypassing the default export of
export default hot(module)(App);

@theKashey
Copy link
Collaborator

So you were using not-warmed App... It should work, but as long as there is no AppContainer around the App - the deep force update was not called, causing your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants