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

Updatest printed to browser console but not actually happening. #16

Closed
Industrial opened this issue Jan 6, 2016 · 3 comments
Closed

Comments

@Industrial
Copy link

Hi.

I'm trying to set up this project with HMR but I can't seem to get file updates actually injected/changing the browser.

https://gist.github.com/Industrial/36c747860fad05259a2b

@Macil
Copy link
Owner

Macil commented Jan 7, 2016

Are the files that you want to be live-reloaded using module.hot or defining React components? If not, then the "Updated modules" log line is misleading and being caused by this bug: #14. You'll need to define your modules to be reloadable by using module.hot or by defining React components (which react-transform-hmr sees and wraps with module.hot usage).

@Industrial
Copy link
Author

I got the problem fixed.

We were using plain functions as react components, and not subclasses of React.Component.

@Macil
Copy link
Owner

Macil commented Jan 12, 2016

Right, react-transform-hmr doesn't currently recognize components as functions: gaearon/react-transform-hmr#6

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