-
Hi, Is it possible to pass multiple parameters to the something like const { isLoading: isEditLoading, mutateAsync: customerUpdate } = useMutation({
mutationFn: (id, data) => updateCustomer(id, data),
onSuccess: () => {
customerDialog.value = false;
toast.add({ severity: 'success', summary: 'Customer updated', detail: 'Customer update successful' })
refetch()
},
onError: () => {
},
}
await customerUpdate(1, { name: 'Test'} ) ; i ended up passing the |
Beta Was this translation helpful? Give feedback.
Answered by
TkDodo
Oct 3, 2023
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
premdasvm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
no. see: https://tkdodo.eu/blog/mastering-mutations-in-react-query#mutations-only-take-one-argument-for-variables