Svelte, a JavaScript Framework unmatched for speed

Tech and Architecture
Vignette article Svelte pour blog Numendo

A JavaScript framework appeared some time ago, taking on React and VueJs head-on. That framework is Svelte, which competes with its elders on several points that we are going to explain in detail in this article.

You should know that Svelte is not brand new; it started to become well known from its latest update, Svelte 3.0.

With the slogan “Cybernetically enhanced web apps”, Svelte aims to be simpler, more reactive and less time-consuming in its code.

Let’s start by understanding what Svelte is

Svelte is defined as a JavaScript framework used in the creation of reactive user interfaces. Its objective is to reduce application loading times considerably.

Svelte, a framework? Not so sure! It is also a JavaScript compiler

If we had to classify it more precisely, Svelte would be somewhat apart from JavaScript frameworks as we know them. Indeed, the way it works includes a compiler, the important element that allows it to differentiate itself from React, VueJs or Angular, for example. In Svelte’s case, there is no need to include a library in your code to enable compilation, since it is already there. Svelte is a framework within a compiler.

To be more precise, comparative analyses have named Svelte as the most performant JavaScript framework compared with React and VueJs.

Using the “compiler framework”

To program with this JavaScript framework, you have to use the file extension created for it: .svelte. But that’s not all! Indeed, Svelte’s code base is HTML, which means it is just as well supported in a .html file. No more headaches — do it however suits you!

An example of a rendering with Svelte was shown here as an image in the French version and needs to be re-attached.

Svelte will compile these lines of code. The file is sent to the browser in compiled form in a distribution version in order to obtain the rendering.

An example of a JavaScript compilation with Svelte was shown here as an image in the French version and needs to be re-attached.

The advantages of Svelte

Its weight and loading speed

One of the big advantages of the Svelte framework is, as its name suggests, how very lightweight it is. Indeed, once the code has been compiled, the application weighs three to four times less than with a compilation under React or VueJs. Unsurprisingly, this leads to an improvement in the application’s loading speed for the user.

At the time of writing this article, a benchmark reveals that the framework is 35 times faster than React and 50 times faster than VueJs. That’s already not bad, but who knows, further changes may yet come to improve these results even more!

Different code to address certain challenges

In principle, the less code you write, the less chance you have of running into bugs, right? Svelte is designed around this idea. The framework aims to be simple and readable. The syntax is written a little differently from what we are used to seeing, but there is nothing insurmountable about it — you get used to it quickly. For example, the { } in the HTML are used to indicate that you want to retrieve the content of the variable. In fact, Svelte aims to let you reduce your lines of code so that your programs remain readable. And it succeeds! On average, for a given function, the JavaScript framework will need 40% fewer lines than React.

The use of the imperative rather than the declarative is another parameter that sets the framework apart. When we develop in a declarative language (HTML), Svelte takes the components in order to translate them into imperative-style language so as to inject them directly into the DOM. But if the application’s code is imperative, how can Svelte detect that a change has occurred? In other words, taking the same example, how can the framework detect that the input field has been filled in? It all comes down to compilation time.

The JavaScript framework’s compilation

To answer the question: Svelte is of course able to know that a change has taken place, thanks to a device of its own: variable = variable. At first glance you might wonder what sense that makes. Indeed, by doing this you are asking a variable to assign itself to itself — but this will tell the framework that it needs to run the checks again in order to detect any changes to be taken into account.

The code is compiled automatically by the JavaScript framework, which means the browser doesn’t have to do all the work. This is what allows Svelte to achieve unbeatable loading speeds. The code is compiled into small, self-contained JavaScript modules injected directly into the DOM.

This compilation happens in real time, while the code is being written. Svelte therefore doesn’t require any browser dependency in order to run. Another good way of reducing the application’s weight and improving its loading time!

The DOM

Svelte’s creator, Rich Harris, explains that he did not want to include a virtual DOM for the simple reason that it represented one more layer to execute when loading the application.

The DOM is therefore no longer manipulated directly by the author of the program, but by the JavaScript framework itself.

In summary, Svelte means a community that has been growing since version 3 went live. A creator who listens and who, following requests from the community, planned to include compatibility with TypeScript in a future update of the framework.

So here is what we can hope for in the JavaScript framework’s next improvements:

  • Svelte Native, for developing Android and iOS applications
  • Sapper, for creating complex applications
  • Svelte GL, to make it possible to create 3D experiences in the browser

Are you interested in JavaScript frameworks? We have plenty of other articles: LocalStack, Sylius Plus, Kendo UI and Vue.js — head over to the Framework section of our blog!

How about we connect?

Shape your brand’s digital future. Whether you want to align your touchpoints, create unified customer experiences, or optimize your omnichannel ecosystem, we design solutions that blend innovation and elegance.

Parler à un expert

Insights,
the essentials

All news
Les 7 métiers de la tech incontournables en 2026
Tech and Architecture 05.08.2026

The 7 must-have tech jobs in 2026

GraphQL Yoga et Appollo
Tech and Architecture 13.05.2025

GraphQL: Yoga vs Apollo, Which Framework Should You Choose?

Certification_Microsoft_Azur Numendo
Tech and Architecture 15.04.2025

Why the Microsoft AZ-900 Certification is an excellent starting point for building Azure Skills

Mehdi developpeur fullstack senior
Tech and Architecture 02.05.2024

Mehdi, Senior Full-Stack Developer at Numendo: “I was on a conventional path that I ended up not following”

Numendo Paris Agency

48 Rue de la Bienfaisance
75008 Paris

Our Paris agency supports brands and key accounts with their most strategic digital projects.

Located just 10 minutes from Saint-Lazare station and steps from the Miromesnil metro, it brings together our experts in consulting, e-commerce, product data, and omnichannel architecture.

Numendo Paris embodies the perfect synergy of strategic vision, technical expertise, and client proximity.

Be part of the adventure
Numendo Paris

Joining Numendo Paris means joining an innovation hub where technical excellence meets an entrepreneurial spirit. A stimulating environment to drive world-class strategic projects right in the heart of the capital.

Numendo Mulhouse Agency

2a Av. Auguste Wicky
68100 Mulhouse

The Mulhouse agency is our technical center of excellence dedicated to the performance of your business platforms.

Located in the heart of Alsace, steps from the Mulhouse train station and in close proximity to Germany and Switzerland, our office is home to a community of passionate experts focused on innovation and code robustness.

It embodies the group’s technological powerhouse, capable of building highly complex B2B and industrial ecosystems.

Be part of the adventure
Numendo Mulhouse

Thriving in Mulhouse means joining a historic hub where a passion for technology and team spirit take center stage. <br>A human-scale environment ideal for tackling large-scale industrial and technical challenges.

Numendo Genève Agency

Rue du Marché 5,
1204 Genève

Our Geneva agency combines a culture of precision with digital expertise to elevate your projects in Switzerland and internationally.

Ideally located in the very heart of Geneva, it offers a premium work environment to support the data transformation of the most demanding businesses.

Geneva is our dedicated hub for structuring product information and deploying agile and scalable e-commerce strategies, primarily within the luxury and finance sectors.

Be part of the adventure
Numendo Geneva

Being part of the Geneva team means cultivating high standards and precision to deliver high-performing, sustainable digital solutions.<br>An exceptional work environment to transform the future of product data and Swiss e-commerce.