Why does the re-frame framework restrict a 1:1 between dispatches and handlers?

At first I found it a little weird. I can think of lots of realistic cases 
where:

```
some event happens -> module a responds; module b responds;
```

Then I thought... well, if one module has a handler that changes the app-db, 
every other module only needs to subscribe to the same query, and they won't 
​*need*​ to also handle that event, it will happen reactively:

```
some event -> module a responds (change db value) -> module b reacts to change;
```

But then I remembered that very frequently I need to handle this behavior:

some event -> module a responds (starts fetching new data) ... eventually 
updates db;

Which I can't seem to fit into the paradigm of 1:1 handler to event.

If we only have a 1-handler per event restriction, how can I also have:

 some event -> capture event in module a (start fetching new data);   ???   ;  
capture event in module b (start fetching a different set of data); 

Receiving the data would be relatively straightforward ... dispatch separate 
events (from a receiving chan) for [:a-data] and [:b-data], but how we 
implement in a decoupled manner the initial "go get data" across different 
modules is lost on me.

Any suggestions / patterns for solving this would be helpful.

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.

Reply via email to