r/javascript • • Jan 15 '21

Svelte beats react for developer satisfaction in 2020

https://2020.stateofjs.com/en-US/technologies/front-end-frameworks/
346 Upvotes

231 comments sorted by

View all comments

Show parent comments

2

u/[deleted] 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.

3

u/ryan_solid Jan 16 '21

Not quite sure I follow. But all the major players are there including React/Svelte/Vue and full tables of 20 libs tested are included at the end of the article if you want to see all side by side. Although IMO the commentary is as valuable as the graphs. Mostly we get to see the raw technical performance with all the marketing hype shelved for a minute. The highest performing library is reactive no-VDOM, but 3 out of 5 of the fastest are VDOM.

First link of the article, all the code is in this repo: https://github.com/krausest/js-framework-benchmark

The table of latest results here I pulled from: https://krausest.github.io/js-framework-benchmark/2020/table_chrome_87.0.4280.66.html

1

u/[deleted] Jan 16 '21 edited Jan 16 '21

This is what I was trying to find. The article linked above just had screen shots but didn’t show all js frameworks.maybe I missed all of them together.

The virtual dom can be fast and has its place but still has overhead. Doesn’t mean it can’t be fast but you can get faster with something like svelte that is compiled and built to be performant.

Every tool has its use.

1

u/ryan_solid Jan 16 '21

Yeah it does show all the frameworks. And it does show Svelte being outperformed in every performance category and in size by a couple VDOM libraries. There are benefits to Svelte's approach but the meaningful impact of this overhead is variable. There are many types of overheads. Svelte has its own overhead/inefficiencies in other areas otherwise it would be front of the list. So while its fun to play at conceptual ideal, Svelte has similar although different conceptual walls based purely on its architecture.

2

u/[deleted] Jan 16 '21

Forsure this is definitely true. Every tool has various pros and cons. And some libraries that don’t use a virtual dom like angular are slow. So it definitely deends on the framework and isn’t all virtual dom VS dom.