This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-08-08
Channels
- # announcements (1)
- # babashka (39)
- # beginners (44)
- # clj-kondo (10)
- # cljdoc (24)
- # clojure (49)
- # clojure-austin (2)
- # clojure-berlin (6)
- # clojure-europe (13)
- # clojure-nl (1)
- # clojure-norway (5)
- # clojure-uk (1)
- # core-async (11)
- # cursive (7)
- # datahike (3)
- # datalevin (2)
- # fulcro (1)
- # hyperfiddle (40)
- # jobs (12)
- # juxt (5)
- # lsp (9)
- # nyc (1)
- # off-topic (27)
- # re-frame (7)
- # releases (3)
- # shadow-cljs (9)
- # timbre (6)
- # xtdb (2)
- # yamlscript (1)
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.
Some prior art: https://github.com/alandipert/storage-atom
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.
There's a super simple example in the re-frame repo's sample todomvc ...
https://github.com/day8/re-frame/blob/master/examples/todomvc/src/todomvc/db.cljs#L61-L87
Thanks for the suggestions everyone.