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

Function onSuccess

packages/query-core/src/__tests__/mutationCache.test.tsx:161–165  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

159 const key = queryKey()
160 const states: Array<number> = []
161 const onSuccess = () =>
162 sleep(10).then(() => {
163 states.push(1)
164 states.push(2)
165 })
166 const onSettled = () =>
167 sleep(10).then(() => {
168 states.push(5)

Callers 2

withPersistQueryClientFunction · 0.85
mutations.test.tsxFile · 0.85

Calls 1

sleepFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…