TanStackT
TanStack4y ago
9 replies
technological-jade

react-query offline mode

Does react-query support something like: it will fetch if device is online, staleTime work like it does now, but when device is offline, it will get data from storage no matter how old the cache is?

For example: I set staleTime: 5 minutes, if device is online, it will fetch again after 5 min, but if device is offline, it will always get data from cache storage
Was this page helpful?