Replies: 1 comment
-
startAt = CONCURRENT_PROMISES_TS[key]
newData = await CONCURRENT_PROMISES[key]
newState.updatedAt = Date.now() Of course keeping the And is anyone actively working on this? Edit: I now have some local changes with this change. |
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
-
It would be helpful to introduce a new state
updatedAt
, which is a timestamp representing the last time we get the data from the fetcher or mutator.Use Case
The typical use case for this feature will be showing a last refreshed time of the data in the UI which is critical for its realtimeness.
Without this new state one can only implement it with an effect hook to monitor the data change. However due to the deep comparison of SWR that doesn't work when data remains the same.
Beta Was this translation helpful? Give feedback.
All reactions