Fork me on GitHub
#re-frame
<
2017-08-23
>
danielneal07:08:18

I use re-frame-async-flow-fx for a lot of the async handlers that need to make server calls etc @yedi

danielneal07:08:28

really helps separate out the handlers and the flow

danielneal13:08:21

anyway of clearing :dispatch-laters when testing reframe apps? I'm getting some :dispatch-laters from previous tests where they are not waited for interfering with later tests....

yedi17:08:45

in re-frame-http-fx's :on-success and :on-failure declarations, is there a way to dispatch multiple events instead of just one

kasuko18:08:50

@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”

josh_horwitz19:08:42

Are they any big walkthroughs of making a full app with re-frame?

yedi20:08:15

@kasuko ya not what i wanted to hear hehe

yedi20:08:17

thanks though

yedi20:08:54

i'm afraid my effect and event handler code is becoming spaghetti

sandbags20:08:01

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)

mikethompson21:08:38

@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

mikethompson21:08:27

2. As was just suggested by @sandbags, it almost sounds as if you might need re-frame-async-flow. Maybe.

stvnmllr222:08:59

anyone have any suggestions for an autocomplete in re-frame? Just wrapping select2 so typeahead.js seem to be possible at least.