Svelte 5 introduced Runes — a new reactivity system that makes React Hooks look verbose. No virtual DOM, no runtime overhead, just compiled efficiency.
What Changed in Svelte 5
Svelte has always been different: it's a compiler, not a runtime. Your components compile to surgical JavaScript that updates the DOM directly.
Svelte 5 takes this further with Runes — a universal reactivity primitive:
// React way
const [count, setCount] = useState(0);
const doubled = useMemo(() => count * 2, [count]);
useEffect(() => { console.log(count) }, [count]);
// Svelte 5 way
let count = $state(0);
let doubled = $derived(count * 2);
$effect(() => { console.log(count) });
No dependency arrays. No stale closures. No rules of hooks.
What You Get for Free
$state — reactive state that works everywhere (components, modules, classes)
$derived — computed values that auto-update
$effect — side effects with automatic dependency tracking
$props — type-safe component props
$bindable — two-way binding props
Bundle output: ~2KB for a typical component. Svelte compiles away the framework.
Quick Start
npx sv create my-app
cd my-app
npm install
npm run dev
Why Runes Matter
Runes work outside components. You can create reactive state in a plain .svelte.js file and import it anywhere. This solves the biggest complaint about Svelte 4 — state management across modules.
// counter.svelte.js
let count = $state(0);
export function increment() { count++; }
export function getCount() { return count; }
Import this anywhere. It's reactive everywhere. No stores, no context, no providers.
Performance
Svelte 5 with Runes is faster than Svelte 4 in every benchmark. The new reactivity engine uses signals under the hood — the same pattern that powers SolidJS and Angular 17.
If you've been waiting to try Svelte — Svelte 5 is the version to start with.
Need web scraping or data extraction? Check out my tools on Apify — get structured data from any website in minutes.
Custom solution? Email spinov001@gmail.com — quote in 2 hours.
Top comments (0)