only complete mutation after query success #2085
-
I'm trying to do something like this:
In other words, the user hits when I add something like Is there a way to do this or a better pattern to follow? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
you can use |
Beta Was this translation helpful? Give feedback.
you can use
onMutate
to run anything you want before the mutation starts, and the usualonSuccess / onError / onSettled
for things that should happen after the mutation. Promises returned from those functions are awaited.