Why You've Probably Never Heard of Svelte, but It's Better Than React and Vue
You've probably never heard of Svelte, an open-source compiler (not a framework) started by Rich Harris. However, It's better than React and Vue, we've used all three and that's our verdict.

What even is "better"? Well, it's better in that it is a compiler, it doesn't do as much of its work in the browser unlike React and Vue. Instead compiles your code down to vanilla javascript and therefore it is dependancy free and has incredibly small bundle sizes.

It doesn't use DOM sniffing, a Virtual Dom or Shadow Dom. Instead it surgically updates the DOM directly.

"Blasphemy!" you shrill. Well, Svelte's pretty smart with the DOM. It converts your components into highly efficient imperative code. Seriously, check it out.

Svelte is also really nice to use as a developer. It follow Single File Component design just like Vue, except you don't need to export default a massive object, instead you can write your components props, methods, computed values and mounted/destroy callbacks more declaratively.

So, it's nice to use and super performant.

Ok, so do just use Svelte for every project then?

No. But I'm seriously wondering why not after writing all of this. I only wrote this post to get the blog numbers up.

"Better" encompasses much more than a tool being nice to use and super performant. The two main reasons we haven't fully adopted Svelte for all projects are Community and Familiarisation.

That being said, Svelte does have a great community, Rich Harris is very active and as Svelte is open-source it has some great people contributing to it. However it's not been around all that long, so troubleshooting issues or finding handy little NPM packages is still catching up. Most of time though, we're building things from scratch so it's not too much of an issue.

Unlike React and Vue which has significant investment, React is owned by Facebook and Vue has money pumped through Patreon, Svelte has no funding. There's an argument to say one could be worried that Svelte could disappear one day, however the community of contributors is pretty strong now, even if Rich Harris decided to put down his tools.

In regards to familiarisation, to be honest Svelte is really easy to use. If you know Vue you'll easily hit the ground running with Svelte. However it's rare to find any developers who have used Svelte extensively and commercially.

I've almost convinced myself to start using Svelte for all projects, but the reality is, we need a few things to happen for us to fully adopt and advocate Svelte for every project.

  • We need to see the number packages tagged as "svelte" to increase on npmsj.com

  • Svelte needs to open a Patreon account and start to receive significant regular funding

  • We need to notice more developers adding Svelte to their repertoire / CV's

If these things were to happen, I can no longer see a strong argument to continue using frameworks such as Angular, React and Vue which have library dependancies, produce larger bundle sizes and are generally less performant in how they interact with the DOM.

Stay in touch with the latest digital news!

We'll send you a monthly newsletter that collates all things digital; from cyber security to design trends.