arqex / freezer

A tree data structure that emits events on updates, even if the modification is triggered by one of the leaves, making it easier to think in a reactive way.
MIT License
1.28k stars 56 forks source link

'live' mode does not trigger listener immediately on parent refresh #48

Closed christianvogt closed 8 years ago

christianvogt commented 8 years ago

I've noticed that listeners on parent nodes are not notified immediately when a child is updated; but rather notified on next tick. The listener attached directly to the store is notified immediately.

Using the new #now() functionality. All listeners are triggered in the correct order immediately, but I'm also receiving notifications again on next tick. Now my listeners have processed the same notification twice.

Here's a jsbin that shows the order in which events are received. http://jsbin.com/mobite/edit?js,console

arqex commented 8 years ago

Hey @zenfe

Thanks for your feedback, it is always very useful. Those issues should be fixed in v0.7.1.