TanStackT
TanStack11mo ago
1 reply
constitutional-coral

Using svelte load function for non-ssr data fetching

Hey hey! Curious if I have this fundamentally misunderstood but is this not something that is supported by tanstack. Or if I've messed up the syntax somewhere. The idea was I could put this createquery on the component but I'd rather start fetching data when hovering on the link so i should move it to the load function? Or any code examples also appreciated
https://tanstack.com/query/v5/docs/framework/svelte/ssr
image.png
Screenshot_2025-03-12_at_4.41.47_AM.png
Screenshot_2025-03-12_at_4.42.36_AM.png
Setup SvelteKit defaults to rendering routes with SSR. Because of this, you need to disable the query on the server. Otherwise, your query will continue executing on the server asynchronously, even af...
SSR and SvelteKit | TanStack Query Svelte Docs
Was this page helpful?