Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/svelte.dev/content/docs/kit/20-core-concepts/20-load.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function load({ params }) {
<div>{@html data.post.content}</div>
```

> [!LEGACY] In Svelte 4
> [!LEGACY]
> In Svelte 4, you'd use `export let data` instead

Thanks to the generated `$types` module, we get full type safety.
Expand Down Expand Up @@ -322,8 +322,8 @@ export async function load({ fetch, setHeaders }) {
const url = `https://cms.example.com/products.json`;
const response = await fetch(url);

// cache the page for the same length of time
// as the underlying data
// Headers are only set during SSR, caching the page's HTML
// for the same length of time as the underlying data.
setHeaders({
age: response.headers.get('age'),
'cache-control': response.headers.get('cache-control')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export const actions = {
{/if}
```

> [!LEGACY] In Svelte 4
> [!LEGACY]
> In Svelte 4, you'd use `export let data` and `export let form` instead to declare properties

### Validation errors
Expand Down
Loading