What is Svelte?

Answer

Svelte is a modern JavaScript framework for building user interfaces, created by Rich Harris. Unlike React or Vue which run in the browser, Svelte is a compiler — it transforms your component code into efficient, framework-free JavaScript at build time. This means no virtual DOM, no runtime overhead, and smaller bundle sizes. Svelte components are written in .svelte files containing HTML, a <script> block, and a <style> block. State and reactivity are handled directly through variable assignments rather than hooks or reactive data wrappers. The result is highly performant applications with less code. Svelte was introduced in 2016 and gained significant adoption with version 3 (2019) which introduced its declarative reactivity model.