How to pass form data to queryClient.setMutationDefault when submitting a form #1598
Replies: 5 comments 6 replies
-
data is always passed to the mutation function (mutate or mutateAsync) returned by useMutation, not to useMutation itself. So, i don’t think i understand the question 🙃 |
Beta Was this translation helpful? Give feedback.
-
I removed it, it's still not working. only working when I give a function
to useMutation, but I want to have the function passed to query liebt.
setMutationDefault
…On Thu, 7 Jan 2021, 21:35 Dominik Dorfmeister, ***@***.***> wrote:
If you set a mutationFn as default, why do you also pass a function to
useMutation? That overrides the default.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1598 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE2LO7QGSNHOUI4DEQAGN63SYYEIBANCNFSM4VZMBEGA>
.
|
Beta Was this translation helpful? Give feedback.
-
Alright let me do that
…On Thu, 7 Jan 2021, 21:47 Dominik Dorfmeister, ***@***.***> wrote:
I can take a closer look if you can reproduce it in a codesandbox.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1598 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE2LO7W5KJTMUV5W5R46FOLSYYFTTANCNFSM4VZMBEGA>
.
|
Beta Was this translation helpful? Give feedback.
-
I have the same problem, I need to pass params to mutationFn. Did you manage to get it done? |
Beta Was this translation helpful? Give feedback.
-
Same here, documentation here looks great, but I was not able to follow that pattern. The call to |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How do i pass form data to queryClient.setMutationDefault when submitting a form..?
Beta Was this translation helpful? Give feedback.
All reactions