salsita / prism

React / Redux action composition made simple http://salsita.github.io/prism/
496 stars 24 forks source link

no HMR #28

Closed jmarceli closed 8 years ago

jmarceli commented 8 years ago

Unfortunately HMR doesn't work, probably because of using stateless functions instead of React components. Are there any known workarounds for this issue?

Here is webpack log info:

[HMR] The following modules couldn't be hot updated: (They would need a full reload!)
log-apply-result.js:13 [HMR]  - 750
tomkis commented 8 years ago

Are you using redux-elm-skeleton ? I am considering open-sourcing some redux-elm-boilerplate since people tend to have problems with stuff like that and I frankly have to admit that it's not easy to tackle.

Anyway, it does work for me in my project.

jmarceli commented 8 years ago

I've just cloned the redux-elm-skeleton and run: npm i followed by npm start. Then I made a small modification to hello-world view. This results in:

[HMR] The following modules couldn't be hot updated: (They would need a full reload!)
log-apply-result.js:13 [HMR]  - 684
tomkis commented 8 years ago

@jmarceli I've just pushed hmr branch to redux-elm-skeleton where you can see how HMR could be set up, look at this commit

jmarceli commented 8 years ago

Fixed. Thanks.

krzysztofpniak commented 8 years ago

@tomkis1 why the commit you mentioned is not merged to master branch?

faceyspacey commented 7 years ago

webpack devserver is problematic. we should use webpack-hot-middleware and the latest version of react-hot-loader. It supports stateless functions.