Access onMutate
context inside of mutationFn
#6790
Unanswered
crutchcorn
asked this question in
Ideas
Replies: 1 comment 2 replies
-
you could just reject the promise in Or, you could move the whole logic inside the mutationFn. |
Beta Was this translation helpful? Give feedback.
2 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.
Uh oh!
There was an error while loading. Please reload this page.
-
BLUF: I'd like to change
mutationFn
from:To:
I'm writing code for an offline app that I'd like to look a bit like this:
Which would allow me to preserve the context from
onMutate
while also showing an error message to my user frommutationFn
. In addition, the context would allow me to show a sync screen with conflicting data above other successful mutations like so:Beta Was this translation helpful? Give feedback.
All reactions