typeof useMutation
hello! I have a
const mutator = useMutation({onSuccess,...})
i pass the mutator to child components .... what is the type of this object?
Thank you!3 Replies
adverse-sapphireOP•3y ago
(and where would i find documentation about that kind of thing in the future?)
extended-salmon•3y ago
I don't know by heart, what does type inference say?
plain-purple•3y ago
Should be
UseMutationResult<TData, TError, TVariables, TContext> . If you're using an editor like vscode, one thing I usually do is hit "go to definition..." on useQuery or useMutation to see the types.