mutation return
Is there a way to get isError/isSuccess/isLoading inside the method after calling the mutate function?

2 Replies
inland-turquoise•4y ago
useMutation returns all the three properties you mentioned https://tanstack.com/query/v4/docs/reference/useMutation. Is there something particular you are trying to achieve?
exotic-emerald•4y ago
if you want to have access to it inside
onCreateTodo, you will have to use the onSuccess and onError callbacks.