-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Description
I've noticed a strange behaviour on repeated mounting and un-mounting.
What happens is that i have tabs component that mounts a specific components on every tab change,
so every time i switch between tabs, the current tab component is mounted again.
I'm using useQuery on each components to fetch the relevant information for the current tab.
When i'm doing the following actions the useQuery getting into fetch loop that never ends.
- mount the current tab component
- useQuery fetches the data
- move to other tab ( the previous component now unmounted and a new component tab mounted)
- get back to the first tab component ( now after the cacheTimeout has been expired )
- useQuery now getting into fetching loop with infinite fetch requests.
See the video below:
https://streamable.com/a90vs
Hope i'm clear enough, let me know if you need more information in order to reproduce it.
Thank you so much!
Metadata
Metadata
Assignees
Labels
No labels