MCPcopy Index your code
hub / github.com/TanStack/query / onFocus

Method onFocus

packages/query-core/src/query.ts:326–333  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

324 }
325
326 onFocus(): void {
327 const observer = this.observers.find((x) => x.shouldFetchOnWindowFocus())
328
329 observer?.refetch({ cancelRefetch: false })
330
331 // Continue fetch if currently paused
332 this.#retryer?.continue()
333 }
334
335 onOnline(): void {
336 const observer = this.observers.find((x) => x.shouldFetchOnReconnect())

Callers 1

mountMethod · 0.45

Calls 4

refetchMethod · 0.80
continueMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected