DEV Community


Discussion on: A realistic SSR ready web app with Svelte + Sapper + StarWars API

divporter profile image
David Porter

I solved this by only fetching in the preload when isSSR is true. In the mounted hook, I do the reverse and fetch if it's CSR. In both cases the object type is an array. But it's only populated in preload on the server