oakes / odoyle-rum-todo

7 stars 1 forks source link

Maintain state between code changes #2

Open andyfry01 opened 3 years ago

andyfry01 commented 3 years ago

Hey Zach,

Super cool library! I watched your talk on it a few weeks ago and I've been very intrigued with it since.

I've playing around with this demo repo today, and one thing I'm noticing is that the app state gets blown away between hot reloads. Is there a way to refactor the code so the O'Doyle session state persists when I make a change to one of the components for example?. This would be a big boost to the dev experience.

oakes commented 3 years ago

I just pushed a change that should do it: https://github.com/oakes/odoyle-rum-todo/commit/15d6dca44ec5ffdb06952937a4a5f8e1de74ca1b

I actually got this idea from someone else :P but it seems to work. Let me know if you notice any problems with it.

andyfry01 commented 3 years ago

Fantastic, I'll give it a try later today!