Fork me on GitHub

I am kind of confused how to go about using mount with cursive. I want to interact with an api and put the resulting response in an atom. And then play around with that data. But I whenever I change the code and the system detects code changes the state gets reset. Using defonce this wouldn't happen.


How do you guys go about such persisting state in your dev cycles? Do I need to use (mount/stop-except the-state) somehow?


It seems defstate works even without calling mount/start so not sure how that would work


I am using clojurescript with figwheel.


@tolitius: I'm not opening the issue yet. I upgraded to latest figwheel and the problem almost went away. Only seen it once or twice today, while before it happened all the time.


@bbss: * is loading data into an atom an expensive operation? * when you "playing around with that data" do you change it in the process? * is this an application state? or this is just dev data (i.e. temp) that is used in REPL, console? if this is the value that is only needed for development, or to play with, it might be ok to just put it in a var as an atom (i.e. not as state).


@jrychter: niice. I don't use figwheel (use boot-cljs) . I would of course use it to investigate an issue, but I'll let you play with it a bit more, since you know it better.


I feel like, in cljs, it could address both issues above, especially during full page reloads / sending large recompiled increments (by figwheel)