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

Method onFocus

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

Source from the content-addressed store, hash-verified

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