This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-04
Channels
- # announcements (5)
- # aws (12)
- # beginners (76)
- # boot (29)
- # cider (24)
- # circleci (9)
- # clojure (64)
- # clojure-dev (27)
- # clojure-europe (3)
- # clojure-houston (1)
- # clojure-italy (33)
- # clojure-nl (19)
- # clojure-poland (1)
- # clojure-spec (6)
- # clojure-uk (20)
- # clojurescript (103)
- # clojutre (1)
- # code-reviews (60)
- # cursive (76)
- # data-science (20)
- # datomic (20)
- # duct (58)
- # figwheel-main (4)
- # fulcro (36)
- # graphql (6)
- # kaocha (4)
- # onyx (1)
- # pathom (15)
- # quil (3)
- # re-frame (15)
- # reagent (15)
- # reitit (9)
- # remote-jobs (2)
- # rewrite-clj (16)
- # ring-swagger (7)
- # shadow-cljs (132)
- # spacemacs (12)
- # sql (5)
- # vim (9)
- # xtdb (12)
- # yada (4)
Does the rf/path interceptor implicitly create a layer 3 subscription?
Interceptors are all about events, and events are completely independent from subscriptions. So to answer your question - no, it does not.
Indeed, thanks. It could be useful for namespacing subscribers under a key in state.
That's true. You may also be interested in this discussion: https://github.com/Day8/re-frame/issues/137
Simple architecture question. I've made a lot of low level events like :clear-field
or :set-field
for a simple web form. I have larger events such as :success-submit
that needs to clear fields and change other values. It seems redundant to change the db
for the fields in multiple locations, but also sending other dispatches from events gives me a lot of events. Not sure if a lot of events is a bad thing.
@david.folkner Oh man! This was basically me some months ago š! I came up with a super thin easy to integrate library that Iām already using in production for two clients projects :).. if it suits your use case, itās a life saver have a look https://github.com/luciodale/fork
Looks interesting, but I wanna learn the guts for now, so I'm making it myself!
hey! whats the best way to do routing with re-frame? i already use secretary (as used in the template), but my question is mainly how i can navigate between pages without causing page reloads using that setup
@david.folkner Event dispatching isnāt too expensive, unless you have a bunch of interceptors. Iād probably start out by dispatching the events as needed, and only optimizing if I saw a problem
@lkowarschick The āuse fragmentā setting is probably the biggest factor in avoiding page reloads
Thanks. What's the simplest way to disptach multile events from an event. I'm used to something like
(rf/reg-event-fx
::create-success
(fn [{:keys [db]} [_ data]]
{:db db
:dispatch [::clear-fields]}))
But don't know the best way to dispatch multiple.How do I do it with things like http-xhrio
:on-success
? Or is it better to create an event like ::success
with the proper dispatches?
Are you using re-frame/http-fx? It lets you just supply an event to dispatch for the :on-success
key, which works well.
There is a wrapper Iāve written. You should take a look at it. https://github.com/LeaveNhA/suluk