MCPcopy Create free account
hub / github.com/TanStack/query / prepare

Function prepare

packages/query-devtools/src/Devtools.tsx:152–160  ·  view source on GitHub ↗
(data: Array<unknown>)

Source from the content-addressed store, hash-verified

150 onCleanup(() => clearTimeout(timeout))
151
152 const prepare = (data: Array<unknown>) => {
153 clearTimeout(timeout)
154 const deadline = performance.now() + 8
155 if (data.every((item) => getDataSearchText(item, deadline) !== undefined)) {
156 return true
157 }
158 timeout = setTimeout(() => setVersion((current) => current + 1))
159 return false
160 }
161
162 return { version, prepare }
163}

Callers

nothing calls this directly

Calls 1

getDataSearchTextFunction · 0.85

Tested by

no test coverage detected