TanStackT
TanStack16mo ago
8 replies
urgent-maroon

How can I access to an invalidated query

Hey guys, I have 2 separated list, for instance I have a list with key ['list1'] and the other with ['list2'], both are using a stale time of 5seconds. When I navigate from the first to the second list, the query ['list1'] has no more observers and become inactive, and when I switch back to 'list1' before the 5seconds of stale time, the function is neither refetching nor taking the cached data (before it has been inactivated).
- How can I not invalidate the query while navigating to the second?
- is it the intended behavior or am I doing something wrong?
- What should I use in my case?
Was this page helpful?