react query stop refetch when i switch browser tabs 28globally 29

Solutions on MaxInterview for react query stop refetch when i switch browser tabs 28globally 29 by the best coders in the world

showing results for - "react query stop refetch when i switch browser tabs 28globally 29"
Luis
06 Sep 2020
1 const queryClient = new QueryClient({
2   defaultOptions: {
3     queries: {
4       refetchOnWindowFocus: false,
5     },
6   },
7 })
8 
9 function App() {
10   return <QueryClientProvider client={queryClient}>...</QueryClientProvider>
11 }
Kia
19 Sep 2017
1useQuery('todos', fetchTodos, { refetchOnWindowFocus: false })