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
Policy.js is a good example of not so great patterns we have created. Let's fix it up so those patterns are not repeated.
Why is this important?
I think we're going to run into similar problems again and again so I wanted to take some time to clean up Policy.js and maybe establish some best practices before people adopt these "less good" ones as a convenience.
Going to break these out into separate issues, but hoping to tackle the following (more info soon).
Gonna close this for now. Still investigating the need for a better Onyx.merge() in the linked react-native-onyx issue. That other discussion didn't get much traction or land on a solution, but I assume will get dug up again eventually.
Problem
Policy.js is a good example of not so great patterns we have created. Let's fix it up so those patterns are not repeated.
Why is this important?
I think we're going to run into similar problems again and again so I wanted to take some time to clean up
Policy.js
and maybe establish some best practices before people adopt these "less good" ones as a convenience.Going to break these out into separate issues, but hoping to tackle the following (more info soon).
Solution
Let's create issues for and solve the following:
create()
andgetPolicyList()
methods to have single responsibility #6153inviteUsers()
andremoveMembers()
rely on modifying a copy obtained viaOnyx.connect()
then callingOnyx.set()
. Let's expandOnyx.merge()
so it can take a callback instead.The text was updated successfully, but these errors were encountered: