The unit test demonstrates how the issue can happen, but basically if we have as the result of a subscription that a callback from a useFacetCallback is called, it could have outdated values.
This would happen simply because the order of the subscriptions could have the internal subscription inside the useFacetCallback be notified after everything else.
An implication of this change, is that the call to get will re-execute any transformations done by a useFacetMap but I don't expect this to be of a concern.
The useFacetRef will potentially have the same issue, but we can investigate and address in a follow-up PR.
The unit test demonstrates how the issue can happen, but basically if we have as the result of a subscription that a callback from a
useFacetCallback
is called, it could have outdated values.This would happen simply because the order of the subscriptions could have the internal subscription inside the
useFacetCallback
be notified after everything else.An implication of this change, is that the call to
get
will re-execute any transformations done by auseFacetMap
but I don't expect this to be of a concern.The
useFacetRef
will potentially have the same issue, but we can investigate and address in a follow-up PR.