Replies: 2 comments 3 replies
-
I think you can easily implement that with a check in you fetch function. function networkAwareFetch(staleData, ...args) {
return isOnline()
.then(() => fetch(...args))
.catch(() => staleData)
} |
Beta Was this translation helpful? Give feedback.
3 replies
-
I myself create a middleware that returns stale |
Beta Was this translation helpful? Give feedback.
0 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.
-
I am using PWA with CRA,
so is it possible if the network was offline to prevent replacing old data with the new on, in this case, error, because the network is offline?
Beta Was this translation helpful? Give feedback.
All reactions