Jose Varela 2020-08-06T03:49:23.215300Z

Check this out, similar to re-frame-10x: Has a feature similar to what we’ve been talking about:

sandbags 2020-08-06T11:38:14.220900Z

In the re-frame docs ( it refers to "`re-frame's` built-in effect handlers, like `dispatch-n` and `dispatch-later`, are detailed in document." But on that page I see defined only dispatch and dispatch-sync . What am I missing?

sandbags 2020-08-06T11:41:21.221500Z

Actually I am not sure that codox page is working. None of the links do anything for me (Chrome 84, macOS 10.14.6)

sandbags 2020-08-06T11:43:51.222500Z

I'm trying to remember how one should dispatch events from an event handler. I suspect using dispatch-async directly is counter-indicated and you should be using reg-event-fx and having something else trigger the dispatch but I can't seem to find it in the docs.

sandbags 2020-08-06T11:45:35.222600Z

Found it, in the Effects: Two Step Plan section, returning {:dispatch […]}

sandbags 2020-08-06T11:51:02.222800Z

It seems like either {:dispatch []} is an example not implemented or there is magic functionality that makes it work not documented. For example if I want do dispatch two events as a side-effect, can I :dispatch [[evt1][evt2]]?

sandbags 2020-08-06T11:59:05.223Z

Okay have found what I need in fx.cljc


@sandbags Sorry, that link on that page is old and wrong (now corrected). This is the link you should be using ...


It seems like you might want effects like this:

{ :db         (assoc db :something :else) 
  :dispatch-n (list [:first-event] [:second-event "yeah"])}


^^^ note that's :dispatch-n and not :dispatch

sandbags 2020-08-06T13:09:32.225900Z

Thanks @mikethompson I eventually ended up spelunking into fx.cljc but grateful for the confirmation. I've been away from re-frame too long!


Glad to have you back :-)

Grant Isom 2020-08-06T15:26:09.227400Z

In our project, our views.cljs is growing pretty fast, are there any patterns or naming conventions for moving to a views folder then having files for each page or group of components?


I usually write a namespace for components that will work together. Similar to the hexagonal architecture.

sandbags 2020-08-06T18:09:09.230400Z

Okay, I'll bite. Hexagonal architecture is a new one on me… where can I find out more?


It just means that you will write many fully qualified events and subs, and only few of them will be global and shared.

Jose Varela 2020-08-06T18:37:23.232200Z

I had heard of this in another context, is it the same?