Fork me on GitHub

I'm running into a head-scratcher with re-frame. I'm getting 'Error <! used not in go block' but I've got go blocks everywhere and I've tested the functions in question outside of re-frame. Has anyone seen this before? (Seems possibly related to the go block taking 10+ seconds). I also seem to have fixed it by moving he go block into a separate function, no idea why that helped.


@jrbrodie77 is it possible to create a minimal environment that reproduces this? IIRC re-frame no longer depends on core.async for the event loop nowadays.....


i have a bunch if mp4s on a page, and when i press the spacebar i want all the "marked" mp4s to play at once. so far, my app-db is

{:videos {1 {:id 1 :marked true :filename "blah.mp4"} 2 {:id 2 :marked true :filename "blah2.mp4"}}}
how would like do something like (dispatch [:play <id>]) and have the videos watch for this dispatch and play?


@akiroz I will try to duplicate it.


@jrbrodie77 Have you seen this guide for encapsulating stateful components like players?


If I were to implement this, I'd store a boolean :playing flag for each video in the app-db and subscribe to that flag in each of the corresponding video components.


your reg-event-db :play is just gonna look something like this:

(fn play [db [_ id]]
  (assoc-in db [... id :playing] true))


oh wow, thanks i'll definitely look at that!


Oh crap, I mentioned the wrong person since the slack icons look the similar (facepalm) Sorry jrbrodie77, I meant to reply to @ackerleytng


I’m trying to use :progress-handler on re-frame's http-xhrio and I was wondering if there’s an example of this anywhere?


couldn’t find anything useful by just googling


@bravilogy look in the "External Resources" document in /docs. Example application in there.


See re-frame-http-fx