This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-23
Channels
- # announcements (66)
- # babashka (41)
- # beginners (93)
- # calva (10)
- # cider (2)
- # clj-kondo (112)
- # cljs-dev (6)
- # cljsrn (1)
- # clojure (44)
- # clojure-dev (10)
- # clojure-europe (35)
- # clojure-italy (15)
- # clojure-nl (3)
- # clojure-uk (2)
- # clojurescript (38)
- # conjure (1)
- # datalevin (1)
- # datomic (16)
- # deps-new (4)
- # events (7)
- # figwheel-main (1)
- # fulcro (59)
- # graalvm (21)
- # integrant (3)
- # introduce-yourself (8)
- # jobs-discuss (2)
- # malli (23)
- # membrane (11)
- # membrane-term (2)
- # missionary (17)
- # off-topic (7)
- # pathom (23)
- # pedestal (6)
- # polylith (7)
- # portal (25)
- # releases (1)
- # remote-jobs (3)
- # reveal (5)
- # shadow-cljs (43)
- # spacemacs (7)
- # sql (18)
- # tools-deps (33)
- # vim (10)
- # xtdb (36)
Firstly don’t be ashamed of passing {}
it is useful information as {}
should for that atom component be the initialisation state of the atom
; i.e. you’d expect to see:
(defmethod :whatever/state [_ state]
(atom state))
You can hide this sort of thing and defaults with ig/prep-key
; though that can hide things a bit too much.
I tend to structure integrant systems into profiles which are meta-merged.
I have a base.edn
which consists of the static config; stuff that is intended to be a sensible default or overriden elsewhere; and then a series of layered files / profiles that meta-merge
ontop of base.edn
… essentially I then do (apply meta-merge [base-profile ,,,, env-profile])
to build the config which I call ig/init
etc on.
Typically the final layer consists of some kind of environment profile i.e. dev.edn
or a prod.edn
or a test.edn
etc…i forgot about prep-key! that’s helpful, yeah
would you be willing to share any of your code? i think i get it but seeing code is very helpful for understanding