Svelte Reference
Reference pages for Svelte — syntax, parameters, return values and runnable examples.
All Svelte reference pages
$: Reactive Statement
The $: reactive statement in Svelte re-runs whenever any value it references changes. Use it to derive values ($: doubled = count * 2), run side effects ($: { ... }), or react conditionally ($: if (...)).
writable() Store
The writable() store from svelte/store holds a value any component can read and change. It takes an initialValue and returns a store with subscribe, set and update — read reactively in a component with the $store shorthand.
This is the Svelte reference on XCODX. Each page documents one feature completely — the exact syntax, its parameters and return value, the gotchas that trip people up, and runnable examples you can edit right on the page.
The pages below are grouped so related topics stay together. Pick one to dive in, or run anything you find in the Svelte online compiler.