TanStackT
TanStack3y ago
16 replies
faint-white

How to detect mutation success event?

I have 2 components
// first.tsx
const { create } = usePost();
const handleCreate = (payload) => {
  create.mutate(payload, {
    onSuccess: () => {
      console.log("created succssfully")
    }
  })
}

//second.tsx
how to I can detect over mutation success event in here?

this is possible with tankstack query?
Was this page helpful?