Svelte 5 正式發布:全新 Runes 反應式系統與 Snippets 帶來前端開發新體驗
Original: What's new in Svelte 5
Svelte 5 is the most significant update in the framework's history, aimed at resolving development bottlenecks that arise as applications…
Svelte 5 迎來重大變革,核心引入基於 Signal 的「Runes」反應式系統(如 $state、$derived),取代以往的 let 與 $ 語法。此外,全新「Snippets」機制取代了傳統的 Slots,簡化了組件間的 UI 傳遞,並將事件監聽改為標準的 onclick 屬性。這些更新不僅提升了效能,也讓 TypeScript 支援更加完善。
Svelte 5 is the most significant update in the framework's history, aimed at resolving development bottlenecks that arise as applications scale. The centerpiece of this update is the introduction of a brand-new reactivity system called "Runes." Runes are based on a Signal mechanism, using explicit syntax such as `$state`, `$derived`, and `$effect` to manage state. This change addresses the difficulty of tracking and maintaining Svelte 3/4's reactive syntax (such as `$:`) in complex scenarios, and allows reactive logic to be used seamlessly across both `.svelte` files and regular `.js/.ts` files.
Free shows the 3-line summary; Pro unlocks the full deep summary (~300 words) so you never have to click through.
See Pro plans →Want the original English / full article?
Read on Vercel Changelog →Summaries are AI-generated; the original article is authoritative.