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

Function prepare

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

getDataSearchTextFunction · 0.85

Tested by

no test coverage detected