This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-23
Channels
- # beginners (55)
- # boot (37)
- # braid-chat (1)
- # chestnut (3)
- # cider (4)
- # clara (22)
- # cljs-dev (54)
- # cljsrn (3)
- # clojure (114)
- # clojure-italy (12)
- # clojure-losangeles (3)
- # clojure-portugal (1)
- # clojure-russia (1)
- # clojure-spec (30)
- # clojure-uk (67)
- # clojure-ukraine (1)
- # clojurescript (101)
- # core-async (11)
- # cursive (6)
- # data-science (27)
- # datomic (8)
- # figwheel (3)
- # fulcro (59)
- # graphql (2)
- # hoplon (89)
- # jobs (3)
- # jobs-rus (1)
- # leiningen (3)
- # lumo (19)
- # off-topic (9)
- # om (48)
- # pedestal (2)
- # portkey (4)
- # protorepl (19)
- # re-frame (13)
- # reagent (38)
- # remote-jobs (1)
- # ring-swagger (4)
- # spacemacs (10)
- # specter (2)
I use re-frame-async-flow-fx for a lot of the async handlers that need to make server calls etc @yedi
really helps separate out the handlers and the flow
anyway of clearing :dispatch-laters
when testing reframe apps? I'm getting some :dispatch-later
s from previous tests where they are not waited for interfering with later tests....
in re-frame-http-fx
's :on-success
and :on-failure
declarations, is there a way to dispatch multiple events instead of just one
@yedi I’m pretty sure the preferred way would be to have a single event that itself then dispatches your multiple events. May not be what you wanted to hear but the “http response” coming in would be a single event in the re-frame “mindset”
Are they any big walkthroughs of making a full app with re-frame?
Sounds like you need some kind of state machine (that may be what re-frame-sync-flow is giving you, i'm not familiar with it)
@yedi two points:
1. remember there's a small amount of code in effect handlers like re-frame-http-fx
. You can quite easily write your own effect and get exactly what you need. I deliberately keep the standard effects minimal, and not handling a multitude of possible variations, like multiple dispatches, because I expected people to develop their own custom versions.
https://github.com/Day8/re-frame-http-fx/blob/master/src/day8/re_frame/http_fx.cljs
2. As was just suggested by @sandbags, it almost sounds as if you might need re-frame-async-flow
. Maybe.