TypeScript Mutation Snippets #8500
Unanswered
jlarmstrongiv
asked this question in
Show and tell
Replies: 1 comment 2 replies
-
Thanks for the work. After working again with my version, I noticed that the Here is an example useOptimisticMutation<Item, Error, Omit<Item, "id">, string[] & {
[dataTagSymbol]: Item[];
[dataTagErrorSymbol]: Error;
}, unknown, unknown>({ queryKey, updater, invalidates, ...options }: We can see that It should be inferred as In this line : Do you have any clue? |
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
-
Previous work:
mutationOptions
useOptimisticMutation
variations from Dominik and GanbinMy variations of the functions:
useOptimisticMutation
optimisticMutationOptions
If you have any improvements, please share!
An example that supports multiple
queryKeys
andupdaters
would be interesting.I hope
mutationOptions
becomes stable soon.Beta Was this translation helpful? Give feedback.
All reactions