Replies: 2 comments 4 replies
-
I'm afraid that's the case. please have a look at the following docs / articles and let's continue in a discussion: |
Beta Was this translation helpful? Give feedback.
4 replies
-
The https://codesandbox.io/s/react-navigation-with-react-query-0ywvd?file=/src/App.tsx |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey react-query Team. Thank you for providing us such a nice library. I really enjoy working with this.
Describe the bug
On rerendering a component the useQuery hook is not calling the fetch function again. Just on init and one(!) state change the effect runs.
To Reproduce
I created a demo:
https://codesandbox.io/s/thirsty-snow-lskrd?file=/src/App.tsx
Expected behavior
After staleTime or cacheTime is expired the useQuery hook have to call the related fetch function again.
Screenshots
see demo
Desktop (please complete the following information):
I am using react-native but the "bug" appears in all browsers and OS environments.
Smartphone (please complete the following information):
In my react-native project this appears in Android and iOS.
Additional context
No other context. Maybe i understood the library hooks in a wrong way.
Thank you for your help!
Beta Was this translation helpful? Give feedback.
All reactions