<script>
let count = 0;
</script>
<button on:click={() => count++}>
Clicked {count} times
</button>
A compiler, not a runtime library
That snippet compiles down to plain, surgical DOM-update JavaScript - no virtual DOM diffing at runtime, because Svelte has already worked out exactly which DOM nodes need to change, at build time, and generated code that updates only those.
Why the bundle size difference matters
A small interactive widget built in Svelte ships noticeably less JavaScript to the browser than the same widget in React, because there's no framework runtime bundled alongside it - just the compiled output for that specific component.
Where we've reached for it
Small, self-contained interactive widgets embedded in otherwise static or WordPress-driven pages - where shipping a full React runtime for one calculator widget always felt like overkill.
No virtual DOM, because there's no runtime library at all
React and Vue ship a runtime that diffs a virtual DOM against the real one at render time. Svelte does that diffing work at compile time instead - the build step generates plain, imperative JavaScript that updates exactly the DOM nodes that changed, with no framework code shipped to the browser to do that comparison at runtime.
<script>
let count = 0;
</script>
<button on:click={() => count++}>Clicked {count} times</button>
Smaller bundles, at the cost of ecosystem size
Compiled output tends to be significantly smaller than an equivalent React app's bundle, since there's no framework runtime along for the ride. What Svelte trades for that: a smaller hiring pool, fewer third-party component libraries, and less Stack Overflow coverage for edge cases - real considerations for a team choosing a framework for a long-lived client project, not just a technical comparison of runtime overhead.