This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-15
Channels
- # announcements (11)
- # beginners (66)
- # boot (6)
- # clara (25)
- # cljdoc (4)
- # cljs-dev (22)
- # clojure (261)
- # clojure-dev (1)
- # clojure-europe (2)
- # clojure-italy (15)
- # clojure-losangeles (1)
- # clojure-nl (19)
- # clojure-spec (62)
- # clojure-uk (50)
- # clojurescript (12)
- # community-development (6)
- # cursive (60)
- # datomic (21)
- # emacs (2)
- # figwheel (2)
- # figwheel-main (3)
- # fulcro (2)
- # graphql (11)
- # hyperfiddle (11)
- # javascript (1)
- # jobs (6)
- # juxt (1)
- # kaocha (5)
- # keechma (2)
- # off-topic (4)
- # onyx (10)
- # pathom (7)
- # re-frame (15)
- # reagent (8)
- # remote-jobs (2)
- # ring-swagger (14)
- # shadow-cljs (35)
- # sql (22)
- # testing (9)
- # tools-deps (62)
- # vim (12)
@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 []
....))
request for a doc: dos and donts
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))
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
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
@braden.shepherdson events are handled as soon as possible. https://github.com/Day8/re-frame/blob/master/src/re_frame/router.cljc#L8-L61