Replies: 1 comment
-
Do you think you could make a small reproduction demo? It does sound like the update produced during un-mount was discarded. If you can't make a demo, could you at least, give some pseudo-code? I can then try to make a demo/write a unit test to conclude if this is to be expected/ a bug/ or a potential improvement. |
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 ran into an issue recently where I had a component that unmounted but on the unmount that cache in SWR was also changed on the unmount, and on the mount again SWR did not notice that the data it had was in fact incorrect. To remedy this I performed cleanup on my useEffect, which included setting my data to null. I was wondering if this is standard practice to have to reset the data, or if this could potentially be a bug?
Beta Was this translation helpful? Give feedback.
All reactions