MCPcopy
hub / github.com/TanStack/query / Mutates

Function Mutates

packages/react-query/src/__tests__/useMutation.test.tsx:673–676  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

671 // eslint-disable-next-line vitest/expect-expect
672 it('should not change state if unmounted', () => {
673 function Mutates() {
674 const { mutate } = useMutation({ mutationFn: () => sleep(10) })
675 return <button onClick={() => mutate()}>mutate</button>
676 }
677 function Page() {
678 const [mounted, setMounted] = React.useState(true)
679 return (

Callers

nothing calls this directly

Calls 3

sleepFunction · 0.90
useMutationFunction · 0.50
mutateFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…