-
We have a few users on fairly poor internet connections and as a result we see some requests failing with network errors (as expected). When this happens, it can result in partially incorrect data displayed due to react-query continuing to serve data from the last successful request. Note: This is not about fully offline support, but rather the occasional network "blip." I have two questions:
Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
We mostly handle this with retries. I would maybe continue to do more retries when there are network errors, and you can also use the returned
no, but you can just catch errors in the
|
Beta Was this translation helpful? Give feedback.
We mostly handle this with retries. I would maybe continue to do more retries when there are network errors, and you can also use the returned
failureCount
andfailureReason
to display information to the user if that is happening.no, but you can just catch errors in the
queryFn
, check if they are network errors, andreturn null
in those cases. Then,null
will be cached as a “successful request”. To re-enable automati…