This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-02-21
Channels
- # announcements (9)
- # babashka (45)
- # beginners (45)
- # calva (1)
- # clojure (40)
- # clojure-austin (16)
- # clojure-europe (16)
- # clojure-nl (1)
- # clojure-norway (35)
- # clojure-uk (4)
- # clojurescript (11)
- # conjure (3)
- # cursive (4)
- # datalevin (14)
- # datavis (1)
- # datomic (8)
- # emacs (6)
- # hyperfiddle (7)
- # introduce-yourself (3)
- # joyride (17)
- # missionary (16)
- # off-topic (2)
- # pedestal (9)
- # polylith (27)
- # re-frame (7)
- # reitit (1)
- # releases (1)
- # shadow-cljs (17)
- # sql (17)
- # tools-build (19)
- # tools-deps (15)
- # xtdb (15)
Hello! Sorry if this has been asked before, but I couldn't find anything. I wanted to ask about using the reagent reaction macro vs dynamic subscriptions for something like this:
(rf/reg-sub
::weather-today-impl
(fn [_ [day place]]
(rf/subscribe [::weather day place]))
identity)
(rf/reg-sub
::weather-today
(fn [_]
(rf/subscribe [::weather-today-impl]
[(rf/subscribe [::day])
(rf/subscribe [::place])]))
identity)
VS
(rf/reg-sub
::weather-today
(fn [_]
(reaction
@(rf/subscribe [::weather
@(rf/subscribe [::day])
@(rf/subscribe [::place])])))
identity)
Obviously the first one is more vervose, but maybe it's more idiomatic or performant?
reg-sub-raw + the reaction macro?