Replies: 1 comment
-
Are you using Suspense? Would be great if you can create an example on codesandbox.io so we can help. |
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.
-
Steps to reproduce:
send a successful SWR query to the server => data != undefined and error = undefined.
After that, I trigger an error response from the server for the subsequent query => data !=null and error != undefined. Is this normal? I'd assume that data should become undefined once error is not.
When I remove the source of error and try to have a new successful server query, since error != undefined and exists in the cache, it is returned immediately which causes my program to redirect to login page and I lose the possibility to fetch data. This causes me a loop unless I reload the page.
Thanks for your help.
Beta Was this translation helpful? Give feedback.
All reactions