Proposal: .asHandler() #5595
Unanswered
Faithfinder
asked this question in
Ideas
Replies: 0 comments
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.
-
How about a convenience function for mutations that will return a handler instead?
I bet some magic could be implemented underneath to keep the reference stable as a bonus. Should probably return a promise like
mutateAsync
, there are form libraries that will automatically put form in submission state if the submit handler is a promise.This is just shorthand for simple cases, you'd still use full
(params) => someMutation.mutate(params)
as soon as things get hairy.Beta Was this translation helpful? Give feedback.
All reactions