Answers for "react query stop refetch when i switch browser tabs (globally)"

0

react query stop refetch when i switch browser tabs (globally)

const queryClient = new QueryClient({
   defaultOptions: {
     queries: {
       refetchOnWindowFocus: false,
     },
   },
 })
 
 function App() {
   return <QueryClientProvider client={queryClient}>...</QueryClientProvider>
 }
Posted by: Guest on June-16-2021
0

react query stop refetch when i switch browser tabs (per query)

useQuery('todos', fetchTodos, { refetchOnWindowFocus: false })
Posted by: Guest on June-16-2021

Code answers related to "react query stop refetch when i switch browser tabs (globally)"

Code answers related to "Javascript"

Browse Popular Code Answers by Language