Open mpal9000 opened 9 years ago
Not sure what the perf implications are, but it's fairly easy to write to localstorage on change and on reload initialize the state based on the latest snapshot from localstorage.
It might be worth looking at how figwheel does it.
@yoshuawuyts I am sure that it can be done in a few different ways and that the single state atom is a key to create this functionality with great results. I was hoping that someone had already tried it.
@ashnur Intresting, I will have a look... Maybe a section in the docs that includes related libraries and tools in other functional languages, would be helpful.
See #180 for a simple example :)
@eightyeight Great, thanks! I will try ASAP
See #185 for an example of hot reloading using browserify.
How to achieve live reloading for components, while keeping the current state atom intact? Something like https://github.com/gaearon/react-hot-loader or https://github.com/gaearon/react-hotify but in a "mercury" way, ie. take advantage of the single state atom and the immutable data structures. I am using webpack but there are a couple more ways for hot module reloading, eg. https://github.com/caspervonb/amok or https://github.com/geelen/jspm-server (have not tried any of those two).