Closed frederikhors closed 3 years ago
I think swr has the same called initialData
: https://swr.vercel.app/docs/with-nextjs, right?
I'll try it in a few moments...
initialData is already supported. I will explore if I am really interested in this but I qould rather like to use the data and error return values to determine if you should show some preview data
It works as expected. Thanks.
I would like to have something like https://sveltequery.vercel.app/guides/placeholder-query-data.
This is useful when you have for example list/detail navigation.
Example: list of users > click on one of them > load from cache (using the list key) > show data > fetch in background for the first time the user data (with a
/user/1
) key.What do you think?