Fork me on GitHub
#re-frame
<
2019-04-09
>
kommen10:04:26

is there an established way to check if re-frame is done processing a series of dispatches, including flushing to dom?

kommen10:04:33

our use case is automated browser testing, where we generate a bunch of user input and want to check the dom state, but those checks obviously should only run when re-frame is done handling all events

kommen10:04:06

I do check (empty? (.-queue re-frame.router/event-queue)), but that doesn’t seem to account for the time it takes to update the dom

kommen10:04:13

ah, looks like (= :idle (.-fsm-state re-frame.router/event-queue)) works

danielcompton18:04:57

@valtteri have you used Chrome's performance tools? I've found them quite good for digging in to see which functions are taking up the most time

valtteri04:04:43

This was probably meant to @U0A5V8ZR6

valtteri04:04:29

I’ve personally not encountered huge perf issues with re-frame. Though it’s good to know where to start looking first when something needs to be optimized.

👍 4