-
-
Notifications
You must be signed in to change notification settings - Fork 543
TypeError: Cannot read properties of null (reading 'useContext') #2266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yeah, we're running into this too, in our app itself (not just tests). Currently troubleshooting. |
I’m running into a similar issue here. At first, I thought it might be because the monorepo had different versions of Tanstack/react-query, but I double-checked and everything looks good. Using Tanstack’s useQuery directly works fine, but when I try using the client from openapi-react-query, I get the same error as mention above. I also tried passing the same queryClient that’s used in the provider to useQuery, but no luck — same issue. |
This is probably related to #1947 |
ℹ With the following versions issue is fixed
@mynnx @caribouflex did you try to update recently ? So we can close this issue |
@jean-smaug Yes it works correctly now on my side! Thank you 🙏 |
Uh oh!
There was an error while loading. Please reload this page.
openapi-react-query version
0.3.1
Description
I'm building a React packages in order to share clients initialization across multiple apps
Inside those apps I try to make unit tests with Jest and I encountered the error in title
TypeError: Cannot read properties of null (reading 'useContext')
Technical context :
10.8.1
v22.14.0
29.7.0
@swc/jest
in0.2.37
There are some issues, on invalid calls of hooks too
Reproduction
Expected result
Understand this issue
Extra
The text was updated successfully, but these errors were encountered: