-
Notifications
You must be signed in to change notification settings - Fork 37
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
React-hot-loader compitability #140
Comments
Looks like Follow the steps here: https://github.com/gaearon/react-hot-loader/tree/master/docs In summary, its something like this:
Last I checked that worked. I did run into an issue however where it only worked if your top level component used JSX. You can use normal react functions in the rest of your app. But otherwise this should give you persistent react state :) Let me know how it works for you |
Thanks for the instructions! Btw, So we need to do this instead: import rhl from 'react-hot-loader'
const { AppContainer } = rhl However, while it doesn't throw any errors, I tried to make counter ticking on index page, and it gets resetted after hot reloading. So, it doesn't work. Instructions and official example shows, that we also need to add something like if (module.hot) module.hot.accept('./App', () => render(App)); I believe Those changes were introduced in |
Hello, I have this all working with JSPM. What they are doing is just ensuring that the HMR only works under development scenarios. There is only filtering logic there, use x for dev and y for prod. We can easily use JSPM to map our requirements. You just have to add this to your jspm.config.js - since it will work well for both dev/prod.
Then you just import the two like so..
The only problem here is the fact we have to use the |
Apologies that I haven't been present. Have major deadlines for Friday. Will be pushing forwards next week. @ArmorDarks you don't need that. The systemjs mechanics are such that this is baked in. Everything should still work ATM. But you may need to use JSX at the top level (due to a bug in react-hot-loader). |
Here stated that it is possible to use react-hot-loader with this project.
However, I see that
react-hot-loader
changed major version. Is it still compatible withsystemjs-hot-reloader
? I'd like to test it out, but because of complete lack of documentation how to add it, I can't figure it out (yeap, I'm too dump for those things. Yet).Can someone elaborate on this? Thanks!
The text was updated successfully, but these errors were encountered: