@@ -5,14 +5,10 @@ import { QueryObserver } from '../core/queryObserver'
5
5
import { useQueryErrorResetBoundary } from './QueryErrorResetBoundary'
6
6
import { useQueryClient } from './QueryClientProvider'
7
7
import { UseBaseQueryOptions } from './types'
8
- import { QueryClient , QueryObserverOptions } from '../core'
9
8
10
9
export function useBaseQuery < TData , TError , TQueryFnData , TQueryData > (
11
10
options : UseBaseQueryOptions < TData , TError , TQueryFnData , TQueryData > ,
12
- createObserver : (
13
- queryClient : QueryClient ,
14
- options : QueryObserverOptions < any , any , any , any >
15
- ) => QueryObserver < any , any , any , any >
11
+ Observer : typeof QueryObserver
16
12
) {
17
13
const queryClient = useQueryClient ( )
18
14
const isMounted = useIsMounted ( )
@@ -27,7 +23,7 @@ export function useBaseQuery<TData, TError, TQueryFnData, TQueryData>(
27
23
// Create query observer
28
24
const observerRef = React . useRef < QueryObserver < any , any , any , any > > ( )
29
25
const observer =
30
- observerRef . current || createObserver ( queryClient , defaultedOptions )
26
+ observerRef . current || new Observer ( queryClient , defaultedOptions )
31
27
observerRef . current = observer
32
28
33
29
// Update options
0 commit comments