Fork me on GitHub

@mikethompson When would a Form-2 be useful? I believe I’ve always just used Form-1


@mikethompson That works for this case. But for the actual problem I am trying to solve, it looks like the underlying problem I have is with the pagination table and the dropdown. But thanks a lot!


@lucio you use Form-1 most of the time. Use form-2 (and form-3 for that matter) when you need a stateful component, not a pure component.

(defn myview [] 
  (let [*r   (reagent/atom "hello")]
    (fn [] 

Braden Shepherdson18:11:51

request for a doc: dos and donts

Braden Shepherdson18:11:12

for example, is it a sin to @some-sub multiple times in a (form-1) view?


I would more likely use (let [some-val @some-sub] #(multiple-uses-of some-val))


Are events always handled in the order they were dispatched?


I understand that this is not guaranteed for effects, but I do not remember reading it about events.


Is there something like dispatching an event and registering an interceptor to be run after the event has been handled? I.e. independent of the original definition of the event, but only for my own invocation of it.


This seems important in the context of re-graph, where I first have to dispatch ::re-graph/init, before dispatching e.g. ::re-graph/subscribe. If events are handled in a different order, the subscription would fail.


@urzds The ::re-graph/init call sounds like a good case for dispatch-sync

Braden Shepherdson20:11:12

I had the impression that dispatched events are just queued up until the next frame. @urzds read the code for dispatch?


@urzds events are handled FIFO