Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lib] Allow multiple simultaneous calls to useUpdateRelationships fro…
…m a single component Summary: In a [final revision](https://phab.comm.dev/D13443?vs=44493&id=44495#toc) to D13443 before landing, I added some code to limit the hook to one ongoing operation per component where the hook is used. I did this because at the time, the hook relied on a piece of React state, and could not support multiple simultaneous calls. Later in D13496, I got rid of this React state, but I didn't reevaluate whether this limitation could be removed as well. Given that we no longer have any issues supporting multiple simultaneous calls, I think it's best to remove this limitation. It could cause issues if `useUpdateRelationships` is called with a new user ID before the previous call completes. In that case, this code would cause the new user ID to be ignored. Test Plan: I never really tested the original concern that caused me to add this limitation. I think it's safe to land this without much testing, since I had tested the functionality because I introduced this limitation and it worked correctly Reviewers: kamil, varun, will Reviewed By: will Subscribers: tomek Differential Revision: https://phab.comm.dev/D13521
- Loading branch information