Skip to content

Commit 1ac7a65

Browse files
committed
feat: configure QueryClient to disable refetching on window focus #11
1 parent 9471380 commit 1ac7a65

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/App.tsx

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
2-
import { GeneralSettingProvider } from './context/general-setting.context'
32
import { ThemeProvider } from './context/theme.context'
43
import { HomePage } from './pages/home'
5-
const queryClient = new QueryClient()
4+
const queryClient = new QueryClient({
5+
defaultOptions: {
6+
queries: {
7+
refetchOnWindowFocus: false,
8+
},
9+
},
10+
})
611

712
function App() {
813
return (

0 commit comments

Comments
 (0)