First Impression with Svelte

happyharis

happyharis

Posted on January 8, 2020

First Impression with Svelte

This article is about my experience with Svelte: likes vs dislikes, and a comparison to a framework (read below to find out which framework)

Svelte is a JS web framework that helps you create web apps by just compiling your code, without a virtual DOM.

It has less boiler plate, no virtual DOM and gives another perception of reactivity. Watch this video about rethinking reactivity. Highly recommend.

After meddling with the framework (by creating a simple landing page),

here are my thoughts on learning about svelte.

Likes

  1. Learning is pretty simple (if you have some background in JS web development) as you are not bombarded with boiler plate. You have to just learn about how Svelte reacts. That's it.

  2. When creating a component, you don't have to write this line of code export default to get exported for other components to be used. WOW.

Dislikes

  1. Routing in Svelte ain't exactly great at explaining to a newbie like me. People who uses Svelte suggest to use Sapper framework (which is built on Svelte). I tried understanding Sapper, and it was overwhelming to comprehend. Yikes 😬

  2. Svelte is pretty new. The community is growing, but it is not matured yet. Just like Flutter back in the days 😆

Which brings me to the comparison of another framework: Flutter.

Similarities with Flutter Web and Svelte

They both, open source, and have their logical code on the top part of the file.

// In Svelte

<script>Logic code here</script>

<style></style>

<html></html>

Enter fullscreen mode Exit fullscreen mode
// Usually when I develop in Flutter

Logic code here

Widget {
 // the html/css
}

Enter fullscreen mode Exit fullscreen mode

Difference with Flutter Web and Svelte:

Flutter - amazing huge team, created by Google, and companies (CodeMagic, Rive) creating tools for the framework

Svelte - Rich Harris and his videos (highly recommend)

I really can't wait what Svelte would be offering next. Thanks for reading!

💖 💪 🙅 🚩
happyharis
happyharis

Posted on January 8, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

First Impression with Svelte
svelte First Impression with Svelte

January 8, 2020

Lazy Loading Images in Svelte
svelte Lazy Loading Images in Svelte

November 20, 2019