diff --git a/docs/svelte/ssr.md b/docs/svelte/ssr.md index b989cef652..aae23414a3 100644 --- a/docs/svelte/ssr.md +++ b/docs/svelte/ssr.md @@ -42,16 +42,16 @@ If you wish to view the ideal SSR setup, please have a look at the [SSR example] Together with SvelteKit's [`load`](https://kit.svelte.dev/docs/load), you can pass the data loaded server-side into `createQuery`'s' `initialData` option: **src/routes/+page.ts** -```ts -import type { PageLoad } from './$types' -export const load: PageLoad = async () => { +```ts +export async function load() { const posts = await getPosts() return { posts } } ``` **src/routes/+page.svelte** + ```svelte