Describe the bug
I have a project that consist in multiple packages :
- a library who export some react-query hooks that define
@tanstack/react-query as peerDependency
- a React app, build with
create-react-app that use the library to fetch data.
Both package, used the same version of react and @tanstack/react-query.

If we try to use the hooks define in the library from the react app, we got the following error :

Your minimal, reproducible example
Steps to reproduce
Expected behavior
We should be able to use the queryClient in both sides (app + lib).
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
- OS : macOS
- Browser : Chrome 110.0.5481.77 (Build officiel) (arm64)
TanStack Query version
4.24.4
TypeScript version
4.9.5
Additional context
No response
Describe the bug
I have a project that consist in multiple packages :
@tanstack/react-queryaspeerDependencycreate-react-appthat use the library to fetch data.Both package, used the same version of
reactand@tanstack/react-query.If we try to use the hooks define in the library from the react app, we got the following error :
Your minimal, reproducible example
Steps to reproduce
Expected behavior
We should be able to use the
queryClientin both sides (app + lib).How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
TanStack Query version
4.24.4
TypeScript version
4.9.5
Additional context
No response