Skip to content

Commit 29b9233

Browse files
khmm12tannerlinsley
authored andcommitted
fix(ReactQueryCacheProvider): use shared queryCaches (#768)
`ReactQueryCacheProvider` uses own `queryCaches`, looks like a typo after refactoring. Due to that typo, `onWindowFocus` is completely broken when isolated query cache is used.
1 parent ff20232 commit 29b9233

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/react/ReactQueryCacheProvider.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import React from 'react'
2-
import { queryCache, makeQueryCache } from '../core'
2+
import { queryCache as defaultQueryCache, queryCaches, makeQueryCache } from '../core'
33

4-
export const queryCacheContext = React.createContext(queryCache)
5-
6-
export const queryCaches = [queryCache]
4+
export const queryCacheContext = React.createContext(defaultQueryCache)
75

86
export const useQueryCache = () => React.useContext(queryCacheContext)
97

0 commit comments

Comments
 (0)