T
TanStack10mo ago
like-gold

onSuccess is not working in component file

i have uploaded both component file and query file, onSuccess is working in component file but not in query file whats the issue here
No description
No description
2 Replies
xenial-black
xenial-black10mo ago
Hi How do you know it's not working?
wise-white
wise-white10mo ago
as others have said in the other thread where you posted this: Please show a minimal, standalone reproduction in stackblitz or codesandbox. It's impossible to help with just a screenshot. I can only reply "it works for me" otherwise, which isn't helpful. please also read: https://tkdodo.eu/blog/mastering-mutations-in-react-query#some-callbacks-might-not-fire
Mastering Mutations in React Query
Learn all about the concept of performing side effects on the server with React Query.

Did you find this page helpful?