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
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2InternalRequires API changes or must be handled by Expensify staffReviewingHas a PR in review
Since Expensify/react-native-onyx#214 was written, when Onyx.clear() is called, and a collection callback is using waitForCollectionCallback is being called n times with each item in the collection passed to it. This is bad because when an Onyx connection is using waitForCollectionCallback, the callback always expects to be called once with a single object for the entire collection.
This results in unexpected behavior for these callbacks when Onyx is cleared.
Solution
Update Onyx.clear() to properly handle this case and only trigger the callback once with the entire collection.
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2InternalRequires API changes or must be handled by Expensify staffReviewingHas a PR in review
Problem
Since Expensify/react-native-onyx#214 was written, when
Onyx.clear()
is called, and a collection callback is usingwaitForCollectionCallback
is being calledn
times with each item in the collection passed to it. This is bad because when an Onyx connection is usingwaitForCollectionCallback
, the callback always expects to be called once with a single object for the entire collection.This results in unexpected behavior for these callbacks when Onyx is cleared.
Solution
Update
Onyx.clear()
to properly handle this case and only trigger the callback once with the entire collection.cc @yuwenmemon
The text was updated successfully, but these errors were encountered: