-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
React Native[Testing]: Queries are stuck in loading #3691
Comments
you need to provide more information please. we have a react native example in the docs that you can fork for a minimal reproduction, thanks. |
Hi there, thanks for the quick response. I created a minimal repo. |
Thanks. I don't really know how to run tests in expo snack 🤔 ? But I have updated my testing-react-query repository to work with v4, and it works fine. Have a look: Note that I also removed
|
Thanks for replying. I am afraid that renderHook in RNTL has not been released yet. I am guessing/assuming that you did not encounter the error as it was a react project, not a react-native. On the other hand, I also did try Below is the error when trying test renderHook from @testing-library/react.
Installing
I guess waiting for RNTL to release |
Can you tell me how i can run the test in expo snack? Then i can play around with it |
Unfortunately, I also do not have also information regarding running tests on expo snack. I have created a minimal react native app for this purpose. |
@tarikpnr same boat here, using react-native with |
I'm going to close this as an upstream issue with feel free to re-open if there is something we can do on react-query side |
Describe the bug
Hey!👋 I wanted to implement offline support to my current react-native app, thus upgraded react-query to
^4.0.0-beta.14
.However, I've noticed that useQuery hooks are not returning any data when testing, they are stuck in loading state...
When I downgrade the react-query back to
3.39.1
everything works as expected again!Your minimal, reproducible example
reproducible example
Steps to reproduce
Expected behavior
useQuery hook should stuck in loading state when testing in
^4.0.0-beta.14
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
react-query version
^4.0.0-beta.14
TypeScript version
^4.0.5
Additional context
No response
The text was updated successfully, but these errors were encountered: