Skip to content
This repository has been archived by the owner on Jun 16, 2020. It is now read-only.

live component reloading #178

Open
mpal9000 opened this issue Aug 10, 2015 · 6 comments
Open

live component reloading #178

mpal9000 opened this issue Aug 10, 2015 · 6 comments

Comments

@mpal9000
Copy link

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).

@yoshuawuyts
Copy link

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.

@ashnur
Copy link
Collaborator

ashnur commented Aug 28, 2015

It might be worth looking at how figwheel does it.

@mpal9000
Copy link
Author

@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.

@crabmusket
Copy link
Contributor

See #180 for a simple example :)

@mpal9000
Copy link
Author

mpal9000 commented Sep 3, 2015

@eightyeight Great, thanks! I will try ASAP

@martintietz
Copy link
Contributor

See #185 for an example of hot reloading using browserify.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants