This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-22
Channels
- # admin-announcements (25)
- # beginners (60)
- # boot (277)
- # cider (5)
- # cljs-dev (3)
- # cljsrn (2)
- # clojure (82)
- # clojure-art (15)
- # clojure-berlin (2)
- # clojure-boston (1)
- # clojure-italy (40)
- # clojure-russia (118)
- # clojurebridge (1)
- # clojurecup (1)
- # clojurescript (82)
- # component (3)
- # cursive (31)
- # datavis (9)
- # datomic (39)
- # editors (1)
- # editors-rus (9)
- # emacs (15)
- # hoplon (50)
- # ldnclj (2)
- # leiningen (4)
- # off-topic (9)
- # om (123)
- # re-frame (28)
- # reagent (7)
- # vim (1)
- # yada (3)
@gabe: i'm using local storage
@mccraigmccraig: how did you wedge it in there?
hold on... just looking for the code
@gabe: i used alandipert/storage-atom
, and read from it in a handler
to set values in the app-db
or vice-versa, set values in local storage
@mccraigmccraig: I am using middleware as shown here https://github.com/Day8/re-frame/blob/fef2c4d3c6658078f7882081416388bced31d44e/examples/todomvc/src/todomvc/db.cljs#L55
@mccraigmccraig: how did you initially wrap app-db
?
@gabe: what dyu mean by 'wrap app-db
' ?
oh, i'm not doing that - i'm just storing a couple of select bits of info into local-storage
i retrieve them at init time, and update them as required
if you want to put everything into local storage then i imagine a middleware based approach is easiest since app-db
is a reagent atom, not a vanilla atom
@mccraigmccraig: that’s what i ended up doing