Should refetchOnWindowFocus
be true globally?
#7670
-
In large codebases, I've seen When users return to a tab after a long time, seeing the latest data is still a good experience. I tried googling for any blogs/articles where I can find if it's good practice to keep the As the default decided by the React Query team is ON, there must be good reasons for that, and I wanted to understand them as I don't see them mentioned in the docs - just that one can disable it globally:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Before TanStack Query v5, some unexpected refetches, detailed in PR #4805, likely led to the default setting of Providing a good user experience out of the box is important from a library perspective. Therefore, having That's my point, but I'm unsure about the actual considerations. |
Beta Was this translation helpful? Give feedback.
-
The idea is to have all the flags on per default and then have the user define a |
Beta Was this translation helpful? Give feedback.
The idea is to have all the flags on per default and then have the user define a
staleTime
for their resources because all the refetches respectstaleTime
.