Fork me on GitHub

Is dispatch-n’s order undefined? I recall it running things from left to right?


It's not stated explicitly to be ordered. But it explicitly requires a sequential collection and it just calls dispatch in order.


Yea, I didn’t realise that wasn’t part of it’s contract, so it could change order at some point in the future?


The probability is not 0 on the infinite timeline. :P But I really doubt that it will ever happen. Same as with the js/console.log syntax never going away.


Even if it breaks with some re-frame update, you could just override it with your own version of :dispatch-n that does everything in the order you desire.


😃 A fair point

David Pham15:05:37

Is there a way to define end to end testing with events in reframe?

David Pham15:05:59

Something like running the app and dispatching the events in. Headless browser?

Dmytro Bunin15:05:18

why not simulate the user clicks with something like [cypress](

David Pham07:05:21

Thanks a lot. I will try it. The reason I want to have events is they have better semantics than clicks.