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
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.
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
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 😬
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>
// Usually when I develop in Flutter
Logic code here
Widget {
// the html/css
}
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!
Top comments (7)
The next Svelte has the router included and a lot of new powerful improvements ... and by the way, Rick Harris is just the public face of Svelte, the team is bigger and solid with a good growing community.
I hope you enjoy creating productive apps with Svelte and Svelte Native.
Svelte 3 seems to be promising but IMO it's currently too risky to start large scale project with it.
What's the risk are you looking at?
At Talenteca we are migrating to Svelte. We considere Svelte 3 it’s already a solid product that will improve a lot of things for us and our clients business.
Hahha, I totally agree with the dislike #1.
It took me a while to wrap my head around how routing works in Sapper.
Regardless, I believe Svelte is gonna set the new de-facto for web and mobile apps.
PS: I wrote a short blog post about how I figured a bit about Svelte routing, might come in handy for someone wandering like me :p
roshnet.github.io/2020/07/14/url-p...
Difference between flutter and svelte:
flutter - amazing huge team.
svelte - Rich Harris and his videos (talking videos).
thank you ☺️