MCPcopy
hub / github.com/TanStack/query / onAppStateChange

Function onAppStateChange

examples/react/react-native/App.tsx:14–19  ·  view source on GitHub ↗
(status: AppStateStatus)

Source from the content-addressed store, hash-verified

12import { useOnlineManager } from './src/hooks/useOnlineManager'
13
14function onAppStateChange(status: AppStateStatus) {
15 // React Query already supports in web browser refetch on window focus by default
16 if (Platform.OS !== 'web') {
17 focusManager.setFocused(status === 'active')
18 }
19}
20
21const queryClient = new QueryClient({
22 defaultOptions: { queries: { retry: 2 } },

Callers

nothing calls this directly

Calls 1

setFocusedMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…