-
Notifications
You must be signed in to change notification settings - Fork 1.3k
data returning { force: true } #637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I had useSWR returning "false" in data, plus it was just not performing its function in life. Turns out I had bad usage of a mutate() call in a websocket event. I had
I actually wanted mutate('somekey', undefined, true), but that isn't relevant. |
Just using
should be intended usage according to documentation though? This error has only occurred after upgrading to v0.3 and when useSWRInfinite was being used |
Can you provide a reproduction? |
Encountered the same today! Where might it come from? |
Thanks for the fix |
Bug report
Description / Observed Behaviour
Sometimes the
data
that is returned from the useSWR hook is a{ force: true }
This seems to be caused by the cache value being set to
{ force: true }
to trigger a re-validate? It's only happened since v0.3.xExpected Behaviour
data
should either return undefined or actual returned data from fetcherThe text was updated successfully, but these errors were encountered: