Svelte · Senior · Question 2 of 75
Why did Svelte 5 move from compiler-instrumented let reactivity to runes?
- ✓Correct answer: Svelte 4 reactivity worked only at the top level of components and was hard to reason about; runes make reactivity explicit and work in
.svelte.jsfiles and classes - 2Runes are faster to type
- 3Svelte 4 didn't support TypeScript
Explanation
With $: statements dependencies were determined statically and only at compile time; runes track them at runtime, including through function calls.