This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-28
Channels
- # aleph (3)
- # beginners (10)
- # boot (135)
- # clara (2)
- # cljsjs (2)
- # cljsrn (1)
- # clojure (68)
- # clojure-austin (4)
- # clojure-france (2)
- # clojure-japan (1)
- # clojure-spec (30)
- # clojure-uk (11)
- # clojurescript (48)
- # component (65)
- # cursive (5)
- # datomic (40)
- # dirac (5)
- # emacs (3)
- # events (16)
- # funcool (2)
- # klipse (46)
- # lein-figwheel (2)
- # luminus (8)
- # off-topic (4)
- # om (7)
- # other-languages (4)
- # parinfer (21)
- # re-frame (15)
- # reagent (30)
- # ring (1)
- # ring-swagger (9)
- # rum (3)
- # specter (7)
- # test-check (8)
- # testing (5)
- # vim (21)
- # yada (4)
I'm giving a talk on re-frame at this year's Conj! http://2016.clojure-conj.org/speakers/ If you have any specific thoughts on things I should cover, or areas you struggled with when getting started, please DM me and we can chat about it.
@shaun-mahood: Awesome, will definitely watch!
@shaun-mahood for sure the cofx/fx stuff needs a proper talk 😄
@richiardiandrea: Most definitely!
Is there a good way to dynamically set the results from the input function when registering a subscription? Something where when a
s reference to some b
changes, the input signal changes too. I'd like to not have to subscript to all of the b
s to make it happen.
(reg-sub
:nested-a-sub
(fn [q-vec d-vec]
(let [[_ a-ref] q-vec]
[(subs/subscribe [:a-sub a-ref])
(subs/subscribe [:b-sub (:refd-b @(subs/subscribe [:a-sub a-ref]))])]))
(fn [[a b] [_]]
...
{:a/1 "a"
:a/2 3
:a/refd-b {:b/1 "w"
:b/2 12}}))
And to clarify the last sentence, I'd like to not have to subscript to all of the b
s to make it happen.
(reg-sub
:nested-a-sub
(fn [q-vec d-vec]
(let [[_ a-ref] q-vec]
[(subs/subscribe [:a-sub a-ref])
(subs/subscribe [:all-bs-sub])]))
(fn [[a all-bs] [_]]
(let [b-ref (get a :refd-b)
b (get all-bs b-ref)]
...
{:a/1 "a"
:a/2 3
:a/refd-b {:b/1 "w"
:b/2 12}})))