Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Very good point. Ditto with hot reloading components. React-Hot-Loader tries to retain component state via complex use of code transformation and "proxy" components, but it's very finicky and has lots of edge cases. Using the "plain" HMR API to just swap out the entire component tree on any component change is much simpler and more reliable, but doesn't preserve component state. Choosing to keep something in Redux so that it gets retained during that situation is a valid choice.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: