Disable refetchOnWindowFocus on react-query (#1936)
This commit is contained in:
+11
-1
@@ -1,3 +1,13 @@
|
|||||||
import {QueryClient} from '@tanstack/react-query'
|
import {QueryClient} from '@tanstack/react-query'
|
||||||
|
|
||||||
export const queryClient = new QueryClient()
|
export const queryClient = new QueryClient({
|
||||||
|
defaultOptions: {
|
||||||
|
queries: {
|
||||||
|
// NOTE
|
||||||
|
// refetchOnWindowFocus breaks some UIs (like feeds)
|
||||||
|
// so we NEVER want to enable this
|
||||||
|
// -prf
|
||||||
|
refetchOnWindowFocus: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user