fetch only once and always on mount #4756
Unanswered
cubecleveland
asked this question in
Q&A
Replies: 1 comment 2 replies
-
This should work - it's exactly what |
Beta Was this translation helpful? Give feedback.
2 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.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a comp that keeps fetching events , as the calls are heavy id like to only fetch the queries once unless the user moves away from the view.. in that case i want to serve from cache but also re fetch and refresh
I have the following set up:
{
staleTime: 10 * (60 * 1000), // 10 mins
cacheTime: 15 * (60 * 1000), // 15 mins
refetchOnMount: 'always'
}
The first part works and the queries never re fetch (no network call) however it doesn't re fetch on remount...
Any help would be appreciated....
Beta Was this translation helpful? Give feedback.
All reactions