You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update county -> Changes Tax -> recalculate total
Update quantity -> changes priceBeforeDiscount & tax
priceBeforeDiscount -> changes subTotal -> changes total
Tax -> changes total
In this case Total is computed from subtotal (computed from priceBeforeDiscount + tax)
and Tax (not computed).
So subtotal needs to be resolved before total. Current implementation is buggy b/c total is recalculated first.
The text was updated successfully, but these errors were encountered:
Store events can be executed in a nested queue to ensure compatibility between Component bindings and external handlers bound via Store.subscribe. This mechanism can lead to the evaluation of stale computations from the prior reaction loop.
To fix, simply add Store Events to their own dedicated Reactor Queue and unpack it prior to resolving computations and executing callbacks. This way, if a Store Event adds its own computations or callbacks because it has been bound via Components, they will be correctly evaluated in a single reaction loop.
Stumbled upon the following case:
Update county -> Changes Tax -> recalculate total
Update quantity -> changes priceBeforeDiscount & tax
In this case Total is computed from subtotal (computed from priceBeforeDiscount + tax)
and Tax (not computed).
So subtotal needs to be resolved before total. Current implementation is buggy b/c total is recalculated first.
The text was updated successfully, but these errors were encountered: