Runes are a way to build reactivity in Svelte.

$state

See more on this rune here $state.

$derived

$effect

The effect rune is only executed when being on the client. Therefore, it can be used to run code that should not run on the server. It runs when the component is mounted to the DOM.

$effect.pre

Is run before the component is mounted to the DOM

Runes mode vs. legacy mode

Once components use runes or explicitly state to use the runes mode, they are in runes mode. Alternative is legacy mode.

See here: https://svelte.dev/docs/svelte/legacy-overview