Svelte

Nowadays Javascript frontend framework expanded like never before. The current battleground is topped by most 3 popular JS Angular, ReactJS and VueJS.

According to the survey, data from developer review ReactJs has won the developer’s heart. Vuejs and Angular got tied on the 2nd.

You can find the survey data on below link

https://www.kaggle.com/sachag/state-of-javascript-2018

Personally I have started using js frameworks in 2014 by exploring angularJS but sadly in the next year 2015, angularJs become Angular2 with the dramatical change and at that point, I had lost my connection with angular and go for searching another horse to ride.

Fast forward 2019 I am using a Vuejs for my personal projects and prefer Vuejs to the new developers for a short learning curve at least shorter than JSX.

Svelte the fourth horseman:

I came across svelte one week ago and realize this is different than other frameworks, basically it is a compiler more than framework. Svelte runs build time, which means it will not include framework itself as a hard dependency, and performance efficiency is much higher than state-driven frameworks like Vue or React.

To create a Svelte boilerplate app, you must have install node, npm, and npx in local machine and run following command

npx degit sveltejs/template my-svelte-project
cd my-svelte-project

npm install
npm run dev

This will open in “localhost:5000” with a Hello world example.

The magic you will find in “package.json” file. In svelte package file look like this,

As you see there are no dependencies, only have devDependencies because svelte is a compiler, and will not bloat the application with the unnecessary script. I think that is crucial for heavy data-dependent project where you do not want any extra legs with your code.