Closed khromov closed 2 years ago
Why is all the fuzz needed? Wound't just passing down the prop from server and then using it in initialData do the trick already?
@ConsoleTVs Thanks for the merge. I tried only setting initialData
, but it still wouldn't render the data in the HTML, so there was a "flash of no data" when loading the page.
It's probable this could be fixed with some SvelteKit-specific integration point in sswr
.
@khromov I have updated your SSR example. Please check it out and let me know!
Turns out it's super easy and convenient to combine
sswr
with server-side fetching in SvelteKit!