T
TanStack4y ago
united-yellow

mutation return

Is there a way to get isError/isSuccess/isLoading inside the method after calling the mutate function?
No description
2 Replies
inland-turquoise
inland-turquoise4y 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
exotic-emerald4y ago
if you want to have access to it inside onCreateTodo, you will have to use the onSuccess and onError callbacks.

Did you find this page helpful?