r/javascript • u/Classic-Watch • Jan 15 '21
Svelte beats react for developer satisfaction in 2020
https://2020.stateofjs.com/en-US/technologies/front-end-frameworks/27
u/andrei9669 Jan 16 '21
Contrary to popular belief, reason why I like React is cus of jsx.
9
u/ck2fan Jan 16 '21
I don't really get why people dislike JSX.
4
u/andrei9669 Jan 16 '21
Yeah, me neither. My only guess is that it looks/behaves differently to traditional html. And for some reason, people just dislike it. Honestly, I kinda get where they are coming from. Cus I started from react, like before doing traditional html/css, I just jumped straight into react and felt like I was at home. Now, if people show me angular or vue I'm like... Ugh.
3
u/De_Wouter Jan 16 '21
Really? It's probably what I like least about React, well that and it's origin...
15
u/andrei9669 Jan 16 '21
and the fact that I don't have to use library-specific props like "v-for" and such. dunno, something about those just rubs the wrong way.
and don't get me started about string specific strings in those props, like
v-for="(value, name, index) in object"if you don't have ide support, good luck with typos.2
97
u/switz213 Jan 15 '21
"beats"
89% to 88%, a rounding error that doesn't even take into account scale. what a dumb clickbait headline.
0
39
u/Vheissu_ Jan 15 '21
Has anyone actually used Svelte on a large LOB application or just on smaller apps? Because, while the examples might look impressive what happens when you throw in a few Node packages, start writing CSS, throw in images, routing and other facets of modern apps.
Don't get me wrong, I think Svelte is cool and I wish it well, but is anyone actually building anything substantial with it yet? I haven't seen any larger success stories shared about it (or maybe I just haven't looked properly).
24
u/eternacht Jan 15 '21
My company just re-wrote one of our main apps in Svelte (SaaS in the biotech space). I haven't worked on it personally but I've heard nothing but praise for the framework and how easy it is to implement features with it compared to React. I have heard complaints about the complexity of setting up the associated dev tooling (e.g., hot-module reloading), though that may be in part due to our very specific back-end setup.
15
6
u/rk06 Jan 16 '21
I think "compared to react" is key part here. fans of preact, vue etc also say the same
2
2
u/Vheissu_ Jan 16 '21
That's great to hear. I agree on the complexity of React. I remember jumping on React in 2014 and after using AngularJS, I was excited about the future of front-end again. I haven't worked with React in a few years until recently, and honestly, it felt unrecognisable to me. I know JavaScript quite well, but React definitely has a learning curve that is steeper than React of 2014. A lot of the complexities seem to exist purely to address's architectural shortcomings in React itself (class components and hooks, Virtual DOM).
I have heard great things about Svelte too and I think competition is good as well. For a project relatively young in comparison, Svelte is very promising.
6
u/DasHesslon Jan 16 '21
Im not part of the project but chess.com is built with svelte which is the first time i spotted it in the wild
5
u/kbradl16 Jan 16 '21
I’ll be all in when svelte kit comes out. The dev experience is worth any production struggles I’d run into. I’ve built a few small apps with svelte but stopped on important projects because of sapper not being up to snuff and the lack of typescript support at the time too.
3
u/Auxx Jan 16 '21
We just rewrote Svelte POC into Angular. Svelte didn't seem fit for large apps. Quick POCs - yes, big products - no.
1
u/Doctor-Dapper Jan 16 '21
Are that many people making large apps anyway? I thought micro frontends distributed by CDN were the next big thing
1
u/SomeRustJunkie Jan 16 '21
Yes. It’s so easy to integrate and library with it, all JS works out of the box. I’ve built many apps in production and the experience is some of the best DX for JS. Lee’s code, faster apps, is brilliant.
1
u/posts_lindsay_lohan Jan 19 '21
Speaking of css, does Svelte have a way of handling styling that works as well and is as intuitive as styled-components?
0
32
Jan 15 '21
Svelte is awesome tho. I really hope it continues to gain traction. I very much prefer it to React.
3
u/yeahdixon Jan 16 '21
Though I have not learned enough but svelte , I am a big fan of simplicity. It may seem obvious to say this but people seem to lose their way. They find a couple of reasons to make things complex to solve some arbitrary issues and or edge cases. This does solve those issues but starts down the slippery slope of complexity. How much is worth that millisecond of improvement to push the boundaries a bit further?
41
u/AuroraVandomme Jan 15 '21
Sadly no matter how good any other framework will be, React would still cover 80% of job offers for like 20 years :/
52
u/TheSaasDev Jan 16 '21
To be honest I'm happy that the JS ecosystem has settled a little bit, instead of constantly changing it up with new frameworks
17
u/meeeeoooowy Jan 16 '21
Seriously, when vue came to out people acted like if you didn't switch to that you were going to be left behind in legacy world as it was soooo much better
I'm glad they were wrong and we could chill for a bit
-5
3
u/ryan_solid Jan 16 '21
A large number of people feel this way. But it's not like it stops moving. People just get off the bus. Which is probably a good thing.
I think Server Rendering is going to be an even hotter topic this year with frameworks vying to get the regular website developers as well.
0
Jan 16 '21
[deleted]
1
u/ryan_solid Jan 16 '21
Almost every framework is working on solutions in this area right now. And theyve been doing so for about the last year and a half. Some already have them have already shipped async server rendering. It just takes React shining the light for people to see the importance. Watch this space in 2021.
0
Jan 16 '21
[deleted]
2
u/ryan_solid Jan 16 '21
Yeah thats the thing and it's fine. If React can stay ahead of the need there is no need to look elsewhere. Since React sets the narrative as well its basically irrelevant if other solutions get there first even by several years or offer only slightly better solutions or do both.
1
Jan 17 '21
This is true. Server side rendering has been baked into Angular for several years now and hasn't gotten a whole lot of fanfare
21
u/Zerotorescue Jan 15 '21
What country? React being the majority would be a dream come true.
9
3
u/AuroraVandomme Jan 16 '21
Europe in general.
3
u/xroalx Jan 16 '21
Angular is very much preferred in corporate, though. At least that's the impression I'm getting from central Europe jobs.
2
u/AuroraVandomme Jan 16 '21
You are right, mostly in banking systems. But 80% of job offers I'm getting are react related. I am react dev but would love to write in svelte.
2
u/icsharper Jan 16 '21
Can confirm. Massively used in Europe, along side with React. Also Flutter getting some traction as well.
0
0
Jan 16 '21
[deleted]
2
u/rk06 Jan 16 '21
.net is backend and react is frontend tech. perhaps you are not filtering out backend jobs
4
3
u/elingeniero Jan 16 '21
Could be worse! React may have lost its sheen but it is still really nice. Without it we'd all have to use angular...
0
Jan 16 '21
It's good that in my country most jobs are angular. There is nothing worse than react redux projects without typescript. Just horrible.
2
-12
u/watanashi1 Jan 15 '21
I think you are right. React is the WordPress of the JS world.
36
u/onesneakymofo Jan 15 '21
Nah, that would be jQuery
0
Jan 16 '21
[deleted]
12
u/mihirmusprime Jan 16 '21
You shouldn't need to pick up JQuery in 2021. JQuery was needed when equivalent in vanilla JS was difficult or tedious to do. Today, it's simpler to perform those same actions in vanilla JS. For DOM access, you can just use querySelector and for requests, you can use Fetch.
-1
u/i_ate_god Jan 16 '21
if you're not using any frameworks at all like react, vue, or svelte then I'd always reach for jQuery, because just because the DOM API can do what jQuery can do, it doesn't mean it can do it in a pleasant way.
$('#hide-btn').click(() => $('.stuff').hide()); $('#show-btn').click(() => $('.stuff').show());vs
document.getElementById('hide-btn').addEventListener('click', e => { document.querySelectorAll('.stuff').forEach(el => el.hidden = true); }); document.getElementById('show-btn').addEventListener('click', e => { document.querySelectorAll('.stuff').forEach(el => el.hidden = false); });I wouldn't use jquery for http requests over either fetch, or the also more pleasant to use, axios library mind you. But for regular dom manipulation, jQuery is about as pleasant of an experience as it can get.
3
u/onesneakymofo Jan 16 '21
Two things though. By depending on jQuery, your codebase falls further behind modern Javascript, and you're now learning jQuery instead of vanilla JS which is what companies care about.
You can always wrap things like you posted in functions so it's not overkill to type every time.
2
Jan 16 '21
if you're not using any frameworks at all like react, vue, or svelte then I'd always reach for jQuery
In other words, you shouldn't need to pick up jQuery in 2021.
0
u/honeybadgerUK Jan 15 '21
Yeah because enterprise companies all over the world use WordPress.
14
-6
u/snejk47 Jan 15 '21
So what? WordPress is just quick to setup and easy to use but security wise it's not "the best" option... React has proven itself and doesn't have bad reputation.
5
u/SomeRustJunkie Jan 16 '21
Most people that use svelte realize how much of a step forward it is in DX, simplicity, and power compared to other frameworks. It feels like an evolution of web development tooling, and a much needed extension of JS as a language.
30
u/_Pho_ Jan 15 '21
As a React professional who hasn't touched Svelte, what can Svelte possibly do to be any better? I don't want to sound like a fanboy, but I feel like React + Suspense + Recoil or Context is pretty much the endgame for front end. What else could it possibly be missing?
29
u/frankandsteinatlaw Jan 16 '21
React makes animations 10x harder / more annoying than they should be. With hooks it’s really easy to fuck up a large app by not memorizing some function coming from a common hook / other similar dependency array issues. Hooks have odd rules that make code with them less pleasant than it could be (think rules of hooks lint rules). React isn’t performant by default in many cases, and even when you patch up the perf leaks it’s really easy to open them back up again. Function components lead to more freedom of code placement, which means code is just less easy to parse codebase to codebase. React leaves a lot of important decisions up to the dev around routing, styling, etc, which is nice in some ways, but in other ways means more work and less standardization. These are off the top of my head.
I’ve been working with react for years and it’s got great core ideas (view is a function of state), but it feels far from an endgame when dealing with all real world app cases.
You should try svelte and see how it feels. It’s also not perfect, but you might find some interesting advantages and disadvantages that will help you gain some perspective.
11
u/qudat Jan 16 '21
Agreed. As much as hooks have simplified component development and abstracting reusable logic, the rules are annoying and it’s so easy to miss something and get stuck in an infinite loop.
I’ve been using react for 5+ years and still love using it, but I’m feeling like we’re going to see a new paradigm emerge that solves the problems we have with react.
3
u/brainless_badger Jan 16 '21
I see this criticism frequently, but infinite loops have been a complete non-issue for me and my team since switching to hooks.
IMO, if you are running into infinite loops frequently you are either not using react's eslint plugin to figure out dependency arrays for you, or you have wrong mental model for derived state (i.e. setState calls in useEffect).
6
u/frankandsteinatlaw Jan 16 '21
I work on an app with 200+ devs of varying skill levels. It’d be nice to not need everyone to understand the non-obvious intricacies of react.
1
u/qudat Jan 16 '21
I get what you’re saying, these infinite loops we run into rarely make it into production, however, hooks dramatically increase the probability of hitting infinite loops in development as compared to class components.
It is an issue and one that will crash your browser.
5
u/andrei9669 Jan 16 '21
I mean, if you have solid eslint rules, and you know basics, it's hard to fuck up.
→ More replies (10)0
u/yeahdixon Jan 16 '21 edited Jan 16 '21
Hooks shmoooks.
Btw Vue has a single callback called nexTick that makes programmatic animations a lot easier on vdom.
I’m stunned react doesn’t have the same. If it exists someone please let me know, it’s killin me
1
u/frankandsteinatlaw Jan 16 '21
Yeah, a lot of react animation code ends up being changing classes with somewhat specific state updates.I haven’t used view but if the idea around nextTick is allowing for default states to exist before moving to the animated state that does sound nice
2
u/yeahdixon Jan 16 '21
Yes it’s handy to say the least. Say you want to fade in a menu immediately after you toggle it on.
showMenu=true // renders menu to the DOM
nextTick(()=>{
let eleContainer = container.querySelector(“.menu”)
// now fade menu or do whatever you want
tweenlib.to(eleContainer, {duration:1.0 ,opacity:1})
})
1
4
u/andrei9669 Jan 16 '21
So in essence, we need a dev dependency that would make react oppinionated? Nextjs?
2
u/frankandsteinatlaw Jan 16 '21
As a curious dev, I do enjoy the way React allows good standards to form overtime by not trying to figure it all out and ship it at once. But when you just want to get shit done from 0 you still have to make a bunch of choices.
Though this isn’t a huge problem for me at this point, it’s certainly a barrier of entry for folks newer to the FE ecosystem.
Frameworks like Next definitely alleviate this to some degree, though Next isn’t your only choice when it comes to batteries included React frameworks.
1
u/andrei9669 Jan 16 '21
I guess it's a curse and a blessing. but as you said, structuring your project comes with experience. at first, I didn't know what should be where but by the third project I got the gist of it.
But I must agree, there should be at least some basic level structure that would be agreed upon between all developers and could be "the standard" I mean, there kinda already is tho, code goes into src and components go into components directory.As long as grouping of code makes sense, it's not that hard to get accustomed with the new codebase. now, if code is all over the place, good luck with that.
8
u/SomeRustJunkie Jan 16 '21
Svelte does everything better. Reactivity, no boilerplate, built in (and better) state management, built in animations, free easy interop with third party libs, no boilerplate, actions, await blocks, etc. You can always write the same apps with less code, because the defaults are more powerful. Also smaller bundles.
1
u/hylomorphizm Jan 19 '21
Svelte is a great framework. The only other framework I consider competitive with Svelte is Solid, mainly because Solid is so freaking fast. Solid has a babel plugin to transpile their special reactive js/ts into vanilla js, so they end up taking a similar approach to Svelte.
1
u/SomeRustJunkie Jan 20 '21
Yea I’ve checked out solid briefly but I was a bit turned off by the syntax. I was worried that it didn’t have the same minimal syntax / optimal dx / 0 boilerplate system that svelte has. Are you familiar enough with both to speak on that relationship?
20
u/evert Jan 16 '21
There's lots of complaints from hardcore React devs about suspense. I won't repeat their arguments, but if you don't see negatives with suspense, you probably are indeed a fanboy.
6
u/epukinsk Jan 16 '21
Can you link some? I'm not finding anything anything on Google. Or just give me some keywords to search for on what people don't like about it?
7
u/evert Jan 16 '21
This is a good description:
9
u/aniforprez Jan 16 '21
I feel this with all major front end frameworks. Every single one of them right now is cobbled together with hacks and workarounds because the standard library is woefully sparse and basic functionality needs to be rewritten every time. I look at the source of react and Vue and want to vomit though at least they're all in on types which at least affords some understanding
The source of back-end frameworks like rails and django is so readable you can implement any functionality they provide again yourself. Not so with these frameworks and that's absolutely terrible
7
u/evert Jan 16 '21
Backend is relatively speaking so incredibly easy though. Handling a request can basically be done in a single thread. Very easy to see and predict in what order code will run. It's just a request that generates a response.
On the frontend you're dealing with pesky humans and events, which means many different application states are possible and you can't really predict in what order your code will run, no matter what you do.
In the almost 2 decades I've done this, I've never seen people particularly happy with structuring code for complex GUIs. I think we're still seeking for a better paradigm, but I despite React's issues, I think it's a fantastic attempt at it.
I don't think React is it, but I think it's a prominent part in the history of this story, and we'll talk about it years later. Svelte and Vue might do some things better, but they're incremental steps.
Hooks completely blew my mind, but they're also fucking weird. Both simpler and incredibly hard to reason about.
3
u/ryan_solid Jan 16 '21
I think because Hooks are a borrowed solution to a problem retrofitted on basically the complete opposite paradigm. The fact they work is genius. Svelte and Vue basically have the fixed version (actually the original version but it took React to make them a thing for other frameworks to know how to market them).
But that's the thing at this point it is all incremental. Interestingly enough it takes fairly large evolutionary changes to improve of what React has done while maintaining a solid base. But it's challenging because all that effort is seeing diminishing returns.
0
Jan 16 '21
[deleted]
1
u/format71 Jan 16 '21
I disagree. Not understanding the abstraction you are using - or even what it abstracts - makes it hard doing the right stuff. Taking the right choices. And especially when things don’t work out as expected; I’m spending so much time with colleagues helping them out of trouble because they never take the time to learn what’s under the hood. So to me, it’s very much important to understand what’s under the hood. And if the framework makes it hard to take a peek under the hood, it’s not a framework for me.
0
Jan 16 '21
[deleted]
2
u/format71 Jan 16 '21
I think maybe it’s the way my brain works. Of cause I don’t know and understand ever single area of the frameworks I use, but still... I don’t like ‘fill in the blanks’ development where I get a spot to write my code and cannot see or understand what keeps the parts together.
0
u/jabarr Jan 16 '21
Let’s not forget if you leak a native element it leaks your entire layout as well, since the fiber node tree is just a big connected graph. For those who don’t know, everyone unmounting an input element has a leak in their React application right now thanks to a chromium bug :)
9
u/gustavo_pch Jan 16 '21
It's incredibly easier to do animations, transitions, state management and some other things in Svelte. Try their tutorial in the official site and you'll quickly see what I'm talking about.
0
Jan 16 '21
[deleted]
1
u/gustavo_pch Jan 16 '21
I haven't used Svelte in a serious project yet, but I don't see how those advantages in DX wouldn't apply to a large project. Actually, I'm pretty confident that Svelte would make me more productive in a large project as I get to write less to achieve the same results.
Just check how you can write a masked input that doesn't loses the cursor position as you type (https://svelte.dev/tutorial/tick) or how few lines you need to add spring animations (https://svelte.dev/tutorial/spring). Those are not trivial things, yet Svelte makes them trivial.
0
Jan 16 '21
[deleted]
1
u/gustavo_pch Jan 16 '21
So you're saying that with Svelte it would be harder to have a lot of files in sync? What exactly do you mean with "in sync"? I mean, Svelte is component-based just as React is. So why do you think Svelte would do a worse job on that regard?
Well, you don't like the syntax. That's fine. I also like how React leverages all JS features.
BTW have you checked the links I provided? Didn't you find impressive how easily those things can be done in Svelte?
1
Jan 16 '21
I meant 'in sync' as in forming a large, cohesive project that is easy to refactor, add features to, etc. Because of React's base being functions instead of xml, there is a large interface for doing this. Svelte has a much smaller interface and lacks basic features such as prop typing.
4
u/ryan_solid Jan 16 '21
Better performance, smaller size, and a cleaner model. React does pretty much have it all though. We are talking about things that are seen as only incremental improvements. Whereas will take complete evolution in approaches to see tangible gains in all these areas.
3
1
u/toolazytofinishmyw Jan 16 '21
they have a good video comparing performance in the svelte website. there are 2 major differences. svelte is a compiler that generates vanilla js at build time, no framework is shipped to the client. it doesn’t use a shadow dom, rather it uses forward references to determine updates, which is more efficient.
14
u/Driezzz Jan 15 '21
Never used Svelte, so i'm interested. But tbh, the stateofjs is just a popularity contest.
20
4
u/yesman_85 Jan 16 '21
I like svelte, the tooling is a little wonky here and there. It does differ from single developer syndrome though. Hard to convince management to switch to a framework with no actual corporate backing, like angular and react.
3
u/desmap Jan 16 '21
long way to go: https://www.npmtrends.com/svelte-vs-react-vs-vue
2
u/brainless_badger Jan 16 '21
Yeah, smaller libs seem to have grossly overestimated usage in this poll, when compared with npm or stack overflow stats. Not only Svelte.
3
u/TryallAllombria Jan 16 '21
I already started some personal projects with React and Vue. And I personally prefer Svelte. It's way more simple to prototype things.
The only thing I don't like is the store system that have some weird syntax that prove they didn't thought about every aspect of their system.
5
u/counterfreight Jan 16 '21
When you have 3/3 people responding yes for thing A, and 600/1000 people responding yes for thing B, thing A will have a higher satisfaction rating.
11
Jan 15 '21
I refuse to learn another js buzz stuff!
3
u/Doctor-Dapper Jan 16 '21
Until it becomes industry standard and you have to if you want to get access to the best jobs.
Not saying svelte will but you need to have that "always learning new stuff" attitude to be a flexible developer
5
u/am0x Jan 16 '21 edited Jan 16 '21
Oh you know another.js?
We used to have a drinking game where we would come up with a noun or verb and see if it was a repo in GitHub.
You’d be surprised. We drank more than you’d think.
1
2
Jan 15 '21
[removed] — view removed comment
0
u/AutoModerator Jan 15 '21
Hi u/toastertop, this comment was removed because you used a URL shortener.
Feel free to resubmit with the real link.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
7
4
u/am0x Jan 16 '21
Oh yea. It’s a baby. Meaning early adopters love the idea, but the eventual execution will be different.
For example, Laravel was the Symphony replacer for php. For years it has been referred as the best.
But then, oh no, people are starting to say that symphony is better again!
Then WordPress, the red headed step child of Content Management Systems was absolutely destroyed by the new CMS’s!
Except it wasn’t...it releases a default WYSWYG with a headless option, and the only real contenders now cost $250+ a month compared to their, well, free tier. Devs have to live in hell just a little bit longer.
I was honestly surprised even Vue survived the birthing process, but after using it, I loved it. Granted, I haven’t used Angular since before the paradigm shift, but I just can’t get on board with it. React is essentially becoming the new jQuery except I’d has cross mobile experience which is a plus.
I get why JSX is cool and works, but I feel like it is a symptom of a bigger overall FE issue.
Anyway, I just kind of want to avoid FE dev these days, it’s like the 80s but with more std’s(npm’s)
5
u/MonkAndCanatella Jan 16 '21
Of course it is. I've used Svelte and it really makes React feel antiquated. I wish our company used Svelte.
2
u/elcapitanoooo Jan 16 '21
Does svelte support TS? Last time i checked the templates had no support at all. Maybe this has changed.
6
2
u/maplefactory Jan 16 '21
npx degit sveltejs/template sveltetest cd sveltetest node scripts/setupTypeScript.jsBoom you've got a TypeScript Svelte template. That script adds the TS configs, etc, and then removes itself.
1
u/cmdr-William-Riker Jan 16 '21
Hoping to use it in production applications in a few years after it stabilizes. It looks really promising and beautifully light weight and clean compared to React and Vue, but it is still new and drastic changes seem to be occurring often within the ecosystem (in particular the creator of svelte recently announced that their web app framework Sapper would not be releases and instead introduced an alternative template within it's place).
As a former Backbone.js SPA developer and currently a vue.js and whatever else developer, the one thing I've always felt all of these frameworks forget about is the data later. Before React we had MV* frameworks, where the Model later, the data, came first and the templating and rendering side would pull from the model. With React, Vue and Angular, the data and the rendering tends to get mixed together in a confusing jumble of code that gets worse, the longer the project lives. Svelte doesn't necessarily solve all the problems that React and Vue have, but at-least it's a fresh start
TLDR; give it two years, then it should be usable in production for a couple of years until the framework inevitably becomes too complicated, convoluted and bloated to be practical in new applications just like it's predecessors.
1
-2
u/yeahdixon Jan 16 '21 edited Jan 16 '21
No vdom. I actually am a fan of this but they say that performance is lost doing updates to multiple dom elements one at a time rather than a single pass. The other thing is that I thought vdom would theoretically allow for rendering out to different platforms, though that really has not happened yet.
-35
-14
u/LastOfTheMohawkians Jan 15 '21
Nobody mention angular. 🤔
1
u/ryan_solid Jan 17 '21
To be fair it was the only popular framework other than Svelte to go up in Satisfaction this year.
→ More replies (1)
0
12
Jan 15 '21
[removed] — view removed comment
7
Jan 16 '21 edited Jan 16 '21
React has a lot more overhead than svelte. This is from my limited understanding.
So take that with a grain of salt. But the virtual dom causes overhead. You have to do virtual dom diffing and then also make the changes to the real dom and sometimes one change to a div will require the whole component to rerender. So svelte being a compiler can build very clean code that doesn’t need to use virtual dom.
Here is a good read: https://svelte.dev/blog/virtual-dom-is-pure-overhead
Edit: grammar
7
u/qudat Jan 16 '21
React has rarely been the performance bottleneck on all of my prod apps and when it is there are ways to tune it.
→ More replies (1)6
u/brainless_badger Jan 16 '21
Overhead of virtual DOM is greatly, and I mean greatly, overstated. Preact is nearly as fast as Svelte, and Inferno is faster - both are vdom libraries.
React's overhead comes from other places, like literally re-implementing event system.
→ More replies (17)3
u/ryan_solid Jan 16 '21 edited Jan 16 '21
How about an article based on actual measurement: https://medium.com/javascript-in-plain-english/javascript-frameworks-performance-comparison-2020-cd881ac21fce
Svelte is still component/control flow granular so it does do a nice chunk of re-evaluation, but it doesn't need in most cases to traverse down all its children. This makes it much faster than naive VDOM implementations. Precompiling DOM operations without running through what amounts to a giant switch statement for each part of the template also gives some nice gains.
2
Jan 16 '21
Yeah you can see how fast svelte is but this article doesn’t show react vs able te the actual site has all frameworks. I couldn’t find the actual site but that allows you to pick and choose frameworks for comparison. This article still shows vanilla js vs svelte which is a good comparison.
→ More replies (4)
0
Jan 16 '21
[deleted]
1
Jan 16 '21
I don't like Svelte syntax. And I'm afraid to say this because fanboys will start complaining about JSX without realizing JSX is just JavaScript and that is the reason it took off.
3
326
u/moufoo Jan 15 '21 edited Jan 16 '21
Sure, because it's the hot new kid on the block.
Fewer people are using it (check the stats) and most are still in the honeymoon phase. Let's see if it can maintain a satisfaction level on par with React when it reaches the same volume of users.
I don't mean that Svelte is bad. On the contrary, I really advise you to check it out (the getting started is amazing). But please be wary of statistics