Skip to content

Search documentation

Find Svelte Patterns and Svelte reference pages.

No results for ""

Try a shorter query or a related Svelte term.

# Use Code Blocks

```js
// +page.js
export const load = () => {
	...
}
```
```svelte
// +page.svelte
<script>
	let name = $state('world')
</script>

Hello {name}!
```

# Make a repl

TBD

# The best way

Ultimately, there’s no single ‘best’ approach, only tradeoffs. On a small scale, these tradeoffs are often negligible. And during prototyping, premature optimization is generally discouraged. However, if optimization is the goal, what specific metrics are you aiming to improve?

# XY Problem

https://xyproblem.info/

# Don’t ask to ask

https://dontasktoask.com/

# Prior Art