You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For local storage cases like localStorage, I ran into an obscure error where it was complaining that the return value didn't have .catch. I fixed by turning my sync fetcher into an async function.
Furthermore, it might be worth considering accepting the fetcher as the second param, since that's how SWR also works.
The text was updated successfully, but these errors were encountered:
I'm curious how it allowed you to use a fetcher function that didn't return a Promise. I will cover this use case, but may I know if you were using Typescript and/or vscode?
For local storage cases like
localStorage
, I ran into an obscure error where it was complaining that the return value didn't have.catch
. I fixed by turning my sync fetcher into anasync
function.Furthermore, it might be worth considering accepting the fetcher as the second param, since that's how SWR also works.
The text was updated successfully, but these errors were encountered: