This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-12
Channels
- # beginners (58)
- # boot (4)
- # calva (1)
- # cider (13)
- # cljdoc (1)
- # cljs-dev (7)
- # cljsrn (14)
- # clojure (93)
- # clojure-canada (1)
- # clojure-conj (1)
- # clojure-germany (1)
- # clojure-italy (6)
- # clojure-losangeles (3)
- # clojure-nl (8)
- # clojure-spec (6)
- # clojure-uk (77)
- # clojurescript (3)
- # cursive (5)
- # data-science (6)
- # datomic (52)
- # emacs (1)
- # figwheel-main (2)
- # fulcro (6)
- # graphql (7)
- # jobs (9)
- # leiningen (1)
- # luminus (15)
- # mount (14)
- # off-topic (94)
- # pedestal (1)
- # re-frame (7)
- # reagent (10)
- # shadow-cljs (75)
- # spacemacs (4)
- # test-check (15)
- # tools-deps (23)
- # unrepl (1)
We have a large object of data that never changes after init. It's needed by events and views.
Should it be in the :db
? Or is the db only for data that could possibly change while the app is running?
Currently we are passing the object around everywhere (a bit tedious)
Dynamically loaded or hard coded?
If hard-coded, just require it in every namespace where you need it. If dynamically loaded from some endpoint, then you probably want to put it in the db.
Dynamically loaded, only loaded once, very early on. (It's from a data
attribute on a DOM node)
OK, we'll put it in the DB. I think we were just confused that we were subscribing to something that is not expected to change
If its from a dom node which is loaded before the script, I would again just read it into a var
@aaron51 my advice us to put as much as you possibly can into app-db
. I can't see a downside.