Replies: 3 comments
-
Kind of like when you pass a function to |
Beta Was this translation helpful? Give feedback.
0 replies
-
Why do you want to have a synchronous function as fetcher? If you want to return data at the initial rendering, you can also use the fallbackData option. |
Beta Was this translation helpful? Give feedback.
0 replies
-
If the data is synchronous use, "fallbackData", to "initialize" it. |
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
-
It would be great if useSWR would immediately return data when the fetcher is synchronous. It seems to always return undefined. Any way to do that besides passing default data to SWRConfig??
Beta Was this translation helpful? Give feedback.
All reactions