Fork me on GitHub
#re-frame
<
2023-08-08
>
Drew Verlee05:08:35

If you wanted to sync your re-frame db, with localstorage, how might you go about it? I'm just starting this brainstorming session, so just give me your one word answers like ratoms or oh-god-dont-do-that.

valerauko11:08:43

I do it this way with re-frame https://github.com/valerauko/kitsune/blob/main/web/src/kitsune/effects.cljs The interceptor can be added to events after which you want to persist. The cofx can be used to load data from storage when you need it.

wevrem16:08:55

I also use co-effects and effects, and (this is probably overkill) transit.

mikethompson23:08:53

There's a super simple example in the re-frame repo's sample todomvc ...

Drew Verlee00:08:58

Thanks for the suggestions everyone.