by montroser · 4y ago · 0 comments
In a sense, the Svelte framework runs at compile-time -- it takes your application source code, and uses its framework to produce a minimal JavaScript bundle that you ship to your end users.
In contrast, the React framework runs at run-time -- you ship React along with your application to the end user, and they boot it all up and run it there.
So, in terms of benefits, Svelte will be smaller and will likely run faster. As a bonus, it's much easier to learn.
For downsides, Svelte can be harder to debug, and the community is smaller. But that said, React is a hot mess with so many ways to do all the things because all the existing ways are terrible and so then people make even more new ways again...
But just like jQuery had its time, and Angular, so too will React fade. And we will look back and think, "whoa that was crazy".
Svelte's surface area is small enough and sane enough that I wouldn't feel bad investing there. You can just spend time getting stuff done instead of obsessing in React land about useEffect vs useCallback and nesting components 20 levels deep etc.
If you want to keep the sanity of Svelte but go for a larger job market and community, Vue is also a pretty good option.