This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-14
Channels
- # aws (1)
- # beginners (52)
- # boot (1)
- # cider (9)
- # clara (4)
- # cljs-dev (40)
- # cljsrn (2)
- # clojure (166)
- # clojure-dusseldorf (1)
- # clojure-italy (38)
- # clojure-spec (13)
- # clojure-uk (32)
- # clojurescript (337)
- # cursive (11)
- # data-science (47)
- # datomic (11)
- # emacs (3)
- # events (1)
- # fulcro (57)
- # hoplon (16)
- # jobs-discuss (1)
- # juxt (11)
- # keechma (21)
- # mount (2)
- # off-topic (44)
- # onyx (9)
- # re-frame (33)
- # reagent (1)
- # ring-swagger (3)
- # specter (2)
- # test-check (37)
- # vim (30)
@mihaelkonjevic Is it possible for a component to dispatch actions to multiple controllers?
you mean multiple controllers?
not out of the box
there was only one occasion where I had a need for that
and it was a very extreme corner case
you can either relay it from a controller (with send-command)
or you can hook into the channel that’s used for commands and do it from there
here’s an example of the second case:
Ok cool. Thanks for the example! I don't actually need it right now, it just came to mind when I saw that :topic
was assoc-ed directly on the component as a keyword.
yes, and I’ve spent a lot of time thinking about it (especially after writing the example I just posted)
the reason why a component can talk only to one controller is because you can swap the topic from the outside
if the controller could add a topic when sending a command
that would couple that component and the controller
and as I said, it is a very rare occasion
(at least in my case)
if I had a system where that was needed in more than one place
I’d probably write a “relay” controller which would take care of that