Skip to content

Commit 2050773

Browse files
authored
fix(hydration): import useQueryClient directly from react-query (TanStack#2121)
1 parent 90308e1 commit 2050773

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

src/hydration/react.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react'
22

3-
import { useQueryClient } from '../react'
3+
import { useQueryClient } from 'react-query'
44
import { hydrate, HydrateOptions } from './hydration'
55

66
export function useHydrate(state: unknown, options?: HydrateOptions) {

tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
"noUnusedParameters": true,
1414
"skipLibCheck": true,
1515
"strict": true,
16-
"types": ["jest"]
16+
"types": ["jest"],
17+
"paths": {
18+
"react-query": ["./src/index.ts"]
19+
}
1720
},
1821
"include": ["./src"]
1922
}

tsconfig.types.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
"declaration": true,
55
"declarationDir": "./types",
66
"emitDeclarationOnly": true,
7-
"noEmit": false
7+
"noEmit": false,
8+
"paths": {
9+
"react-query": ["./src/index.ts"]
10+
}
811
},
912
"files": [
1013
"./src/index.ts",

0 commit comments

Comments
 (0)