This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-01
Channels
- # announcements (10)
- # aws (1)
- # babashka (19)
- # beginners (104)
- # calva (50)
- # cider (17)
- # cljs-dev (135)
- # cljsrn (56)
- # clojure (240)
- # clojure-dev (4)
- # clojure-europe (19)
- # clojure-nl (2)
- # clojure-uk (7)
- # clojurescript (22)
- # conjure (2)
- # css (1)
- # cursive (10)
- # data-science (1)
- # datomic (60)
- # emacs (2)
- # events (2)
- # exercism (1)
- # figwheel-main (3)
- # fulcro (13)
- # graalvm (5)
- # gratitude (1)
- # inf-clojure (4)
- # introduce-yourself (5)
- # jobs-discuss (21)
- # lsp (36)
- # malli (6)
- # meander (8)
- # missionary (12)
- # off-topic (14)
- # pathom (13)
- # pedestal (10)
- # polylith (42)
- # re-frame (5)
- # reagent (12)
- # reitit (3)
- # releases (8)
- # sci (10)
- # shadow-cljs (37)
- # sql (5)
- # tools-deps (6)
I have a subscription chain like this
(rf/reg-sub
::holidays
(fn [db]
(prn "holidays sub")
(:holidays db)))
(rf/reg-sub
::raw-people
(fn [db] (:people db)))
(rf/reg-sub
::people
:<- [::raw-people]
:<- [::holidays]
(fn [[people holidays]]
(prn "people sub")
(->> people
(map process-db-user)
(assoc-holidays holidays)
(sort-by :name))))
And in my view I am subscribing to ::people
, however, when I update :holidays
in the db, people does not re-render. I only get "holidays sub"
in the console. Am I doing something wrong here? I would expect people to render whenever its inputs changeNeed the rest of the relevant code - how ::people
is used and how you update :holidays
.
So I restarted my repl and now I can no longer reproduce… it just started working 🤷 I can only imagine that my code wasn’t compiling properly and I was stuck on some old version