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

Function Mutations

packages/react-query/src/__tests__/useMutationState.test.tsx:29–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27 }
28
29 function Mutations() {
30 const { mutate: mutate1 } = useMutation({
31 mutationKey: ['mutation1'],
32 mutationFn: () => sleep(50).then(() => 'data'),
33 })
34 const { mutate: mutate2 } = useMutation({
35 mutationKey: ['mutation2'],
36 mutationFn: () => sleep(10).then(() => 'data'),
37 })
38
39 return (
40 <div>
41 <button onClick={() => mutate1()}>mutate1</button>
42 <button onClick={() => mutate2()}>mutate2</button>
43 </div>
44 )
45 }
46
47 function Page() {
48 return (

Callers

nothing calls this directly

Calls 2

sleepFunction · 0.90
useMutationFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…