How to manage mutation for a list #7573
Unanswered
yishay-at-bay
asked this question in
Q&A
Replies: 1 comment
-
I'd create one useMutation for each task |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Lets say that I have a list of tasks and that in each of them I can check the task as done/undone and save that update to the server with a mutation
Should I create one instance of this mutation for all the tasks? Or should I create an instance of the mutation for each task?
In terms of performance a single instance is better for sure. But are there any other considerations that might make me favor multiple instances?
For example, if I use one instance and a user updates the done checkbox in a number of different tasks in sequence and doesn't wait for a single task update to complete before updating another, can it cause issues in terms of success/error callbacks?
Beta Was this translation helpful? Give feedback.
All reactions