This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-08-03
Channels
- # announcements (63)
- # asami (29)
- # beginners (23)
- # calva (23)
- # cider (18)
- # clj-kondo (12)
- # clojure (156)
- # clojure-europe (30)
- # clojure-italy (6)
- # clojure-nl (5)
- # clojure-uk (6)
- # clojurescript (14)
- # conjure (26)
- # cursive (8)
- # datalog (143)
- # datascript (1)
- # datomic (6)
- # duct (2)
- # emacs (50)
- # events (4)
- # figwheel-main (6)
- # fulcro (7)
- # graphql (12)
- # jobs (6)
- # malli (1)
- # mid-cities-meetup (2)
- # off-topic (4)
- # pathom (6)
- # portal (7)
- # re-frame (10)
- # reagent (8)
- # reitit (10)
- # releases (1)
- # reveal (18)
- # shadow-cljs (39)
- # sql (4)
- # tools-deps (36)
- # vim (25)
- # xtdb (6)
If I am understanding my bug right then I think I've been caught out by this before. That a single signal to a subscription is passed as a value, multiple signals are passed as a vector. Most of the time I am doing single signals and I get used to the idea they are values, then forget when I have multiple signals and get confused. If so, I might prefer that signals always be passed as a vector, even of 1 element, but I suspect that would break too much now.
And nothing prevents you from wrapping even a single signal in a vector. It's all very simple - the shape of what you return from the signal function is preserved, that's it. A single value becomes a single value, a vector becomes a vector, a map becomes a map.
I realise now I wasn't clear, I'm taking about using the sugared :<- [:signal]
syntax
I feel you, made the same mistake with :<-
many times! Same with forgetting to skip (`_`) the event ID when destructuring. Now all those things are second nature