Default networkMode configuration and fetchStatus = "paused" #4753
-
I recently worked on a "bug" in our production app where react-query silently stopped making requests across the application. Only for a specific user and only in Chrome. After a long debugging session, I finally found the I think react-query can do more to help in this scenario:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Feel free to PR
A query can only be paused because there is no network connection. This is documented here:
you can set a custom event listener on the one way to achieve this is to make a fetch request and catch the network error.
we went with this default query because more often than not, react-query is used for data fetching. You can easily opt out of this by setting the
|
Beta Was this translation helpful? Give feedback.
-
Understood, thanks for the quick reply. I'll stick to having |
Beta Was this translation helpful? Give feedback.
-
Do any of you know if TanStack query has moved away from using I've been experiencing the chromium bug that shows |
Beta Was this translation helpful? Give feedback.
Feel free to PR
A query can only be paused because there is no network connection. This is documented here:
you can set a custom event listener on the
onlineManager
if you want a better way to determine if you're really online or not: