Fork me on GitHub
#re-frame
<
2020-10-23
>
achikin08:10:25

I was looking through re-frame CHANGELOG and found this

1.1.0 (2020-08-24)
Added
re-frame now guarantees that a :db effect, if present, will be actioned before any other sibling effects. re-frame continues to provide no guarantees about the order in which other effects will be actioned.
I was pretty sure that re-frame already guaranteed that :db is actioned first before 1.1.0. Am I wrong?

p-himik08:10:28

You are. You're probably thinking of this effect map:

{:db (...)
 :dispatch [...]}

p-himik08:10:56

Here, the effects are unordered. But the event is handled after the :db effect is handled simply because :dispatch doesn't handle the event itself - it just schedules it.

👍 6