Do we have a way to know which data is stale or new? #782
Unanswered
anothertempore
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Hi! First I have a question regarding the scenario that you are dealing with: if we fetch the API and the response is the same as our cached data, should we show the message? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Is this already solved? I need something like this |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys!
I have a scenario that needs totally rely on the data responded from the API. SWR always returns the cache data first then revalidate it in the background. If I get data I'll show some important messages to users. If I get the cached data first, this message will be shown, which might not the correct message.
So I'm thinking if I can know what kind of data is a staled data, I can ignore them in this scenario. 🤔
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions