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

Method onFocus

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

Source from the content-addressed store, hash-verified

329 }
330
331 onFocus(): void {
332 const observer = this.observers.find((x) => x.shouldFetchOnWindowFocus())
333
334 observer?.refetch({ cancelRefetch: false })
335
336 // Continue fetch if currently paused
337 this.#retryer?.continue()
338 }
339
340 onOnline(): void {
341 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