Svelte is a component-based framework similar to React or Vue, but with an important difference. Traditional frameworks allow you to write declarative state-driven code, but not without penalty: the browser has to do extra work to convert these declarative structures into DOM manipulations, using techniques like virtual DOM diffing that eat up the available rendering frame budget and add duties to the garbage collector.

Instead, Svelte works at build time, converting your components into highly efficient imperative code that updates the DOM with surgical precision. As a result, you can write ambitious applications with excellent performance specs.

The first version of Svelte was dedicated to testing a hypothesis – that a purpose-built compiler can generate reliable code and provide a great user experience. The second version was devoted to small improvements that tidied up a number of things.

Svelte’s pros

  • high performance
  • small size of the final code
  • ease of use for beginners

And what about the disadvantages, are there none at all? Alas, unfortunately, this framework is quite young and has not yet received due attention from the developer community. This means that the word svelte is almost never heard in the offered vacancies. Entering the labor market with a skill that is not in demand yet is not what beginner frontend developers need. The framework hasn’t yet achieved the necessary popularity to count on the support of the big players in the IT sphere, like Angular or React. And without that, it doesn’t have extensions for code editors, ready-made component sets. But Svelte has an active developer community on github, where you can always ask for help or contribute to the development of this technology.

Unlike its brethren, Svelte doesn’t use virtual DOM and still outperforms them in terms of size and performance. The conclusion is self-evident – virtual DOM is certainly a cool thing, but not a panacea. It turned out that you can achieve high performance without virtual DOM. Over the past few years, new JavaScript frameworks have been appearing every now and then, rapidly gaining popularity. Such an invasion of frameworks always puts newcomers in a stupor. Experienced developers regularly hear the same question: I want to become a frontend developer, but I don’t know where to start. There’s so much to learn, it’s overwhelming.