What is Svelte? & Why it is so popular?

By Sani Philip | 14th June 2022 | 1 min read

What is Svelte?

Svelte is a modern JavaScript framework that can help build web apps that are fast, lean, and enjoyable to work with.

It is similar to JavaScript frameworks such as React and Vue, which share the goal of making it easy to build slick interactive user interfaces.

But there's a crucial difference: Svelte converts your app into ideal JavaScript at build time, rather than interpreting your application code at run time. This means you don't pay the performance cost of the framework's abstractions, and you don't incur a penalty when your app first loads.

You can build your entire app with Svelte, or you can add it incrementally to an existing codebase. You can also ship components as standalone packages that work anywhere, without the overhead of a dependency on a conventional framework.

Why is Svelte so popular?

One of the reasons Svelte is popular is that it is easy for beginners to learn.

Understanding components

In Svelte, an application is composed of one or more components. A component is a reusable self-contained block of code that encapsulates HTML, CSS, and JavaScript that belong together, written into a .svelte file.