Replies: 1 comment 1 reply
-
I feel like this problem is similar to #1070 and #1074 which are fixed in #1075. |
Beta Was this translation helpful? Give feedback.
1 reply
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'm not sure if this is a bug, but here is what is happening.
I have a list of items in a table that each has an action button for updating. During an update action, i do an API update request and call mutate for updating the cache. Here is the UI:
This always works fine but it doesn't when the list is revalidating. For example:
After the page regains focus and immediately one action button is clicked,
After the page regains focus but instead of immediately, you wait for re-validating to finish (isValidating resolve to false) and then do the action, then successfully the UI re-renders and shows the new changes.
Still not sure if this is how SWR is supposed to work but my current solution is to disable the action buttons while revalidating is true. But this could be bad experience for some one with slow connection.
My question is:
why is it behaving like this?
Beta Was this translation helpful? Give feedback.
All reactions