Svelte

Nicole Creshon
Frontend Weekly
Published in
2 min readJan 24, 2018

--

I’m a huge fan of front end development. So, when introduced to a new front-end technology I am curious to say the least. Recently, I came across a “light weight” JavaScript framework called Svelte. We’ve all heard the light weight framework phrase a few times before. I wanted to know what set this apart from other more established frameworks.

The disappearing framework

Svelte advertises itself as the disappearing framework. They say that because no trace of the framework is sent to the client. It is compiled at build-time and turned into vanilla JavaScript. So, unlike other frameworks that are interpreted in the browser there is no need for Svelte code to be sent to the client.

We’ve seen it before

When starting out with Svelte you can’t help but to have an eerie deja vu feeling. This is because some of the code is reminiscent of other frameworks. Like many of the other frameworks out Svelte is composed of components. Like React and Vue.js these components are single file(.html files in Svelte’s case). When setting state Svelte like Backbone uses setters and getters. Like AnuglarJs expressions to be executed are wrapped in double curly braces. Since I am familiar with these frameworks understanding Svelte came pretty easy. That in itself is a plus since the learning curve isn’t very steep.

Faster…Lighter

Svelte is faster and lighter than almost all other JavaScript frameworks out right now. Compared to React 45kb Svelte is only 3kb. Everyone wants to save on memory, right? Since the code for the framework doesn’t have to load in the browser it is faster especially on mobile devices.

The Cons

A downside is Svelte isn’t battle tested. There isn’t a very big online community for it either. Finding answers on stackoverflow is slightly hard. That is to be expected since this framework was just released in November 2016.

The Wrap up

My dive into Svelte honestly was pleasant. Although, I’m leery of using it on a larger scale project. I can say that I look forward to using it for a smaller scale application and not just practice project. As always Happy Coding!

--

--

Nicole Creshon
Frontend Weekly

I’m a full stack engineer with a love for front-end