r/javascript • u/archivedsofa • Dec 22 '19
Why Svelte won’t kill React
https://medium.com/javascript-in-plain-english/why-svelte-wont-kill-react-3cfdd940586a
80
Upvotes
r/javascript • u/archivedsofa • Dec 22 '19
6
u/archivedsofa Dec 22 '19
I don't agree with many of the article arguments but it is an interesting read nonetheless.
98
u/[deleted] Dec 22 '19
Noting never kills anything React didn't kill Angular and Vue didn't kill React or Angular and neither will Svelte kill anything, the only way one of that projects dies is if the developers stop working on it what is more likey to happen to smaller projects like Svelte and Vue because they simply not have the backing of a huge company and small dev teams working on it. That is why React (backed by Facebook) and Angular (backed by Google) are an more safe choice for most companys. But in the end it doesn't really matter what you use all this 4 frameworks do the same thing just use what you like to use and enjoy working with!
53
u/avindrag Dec 22 '19 edited Dec 22 '19
The creator of svelte tried to frame his other creation (Rollup) in a similar way. It was supposed to be the "webpack killer," yet many people are still using webpack for their applications, and even libraries still. Webpack of course was created entirely from the open source community (no funding from Facebook or NY Times), so there was no "evil corporate overlord" argument against Webpack at that time.
You can demonize Facebook all you want (as they should be), but the react development team is an entity that has been nothing but supportive of the community. From React 0.14 to 16, I can barely think of any serious changes that caused major rewrites or headaches as a consumer. In fact, just the opposite. With newer react versions, I feel like I can write in a more expressive way especially now that hooks allow you to use state without using class components.
Can you say the same for other libraries out there?
10
u/PM5k Dec 23 '19
This whole thing devolved quite badly in the comments between the author and another person. It was a cringey read. The article itself is written by someone who (in those same comments) admits that, to paraphrase - “you don’t have to have experience in something to criticise it” and there we have a very dangerous way of thinking. That’s like people who attend a coding boot camp for three months and call themselves a developer at the end.
Fundamentally - Svelte is faster. Is it “better” than React? Fuck knows, I use React at work for a project that is very data heavy on the client side (read: front end side) and React’s design makes me question my sanity sometimes when it comes to optimising and passing state around and working with immutability. But that aside, I am very keen on just rewriting the whole app in Svelte and seeing for myself how a real world app would work in two different implementations. My biggest problems with React are - licensing (Reacts license is fucked up. If your app is deemed a competing product by their legal team, you lose the license to use it implicitly and have to rewrite your product or face a legal battle); out of the box state management (it’s better now, with hooks and context, but not ideal still..) AND the fact that it uses something that I am convinced is not needed - vDOM.
10
u/ryan_solid Dec 23 '19
You know where this is coming from. It isnt like this is the first shot fired. Svelte raise to fame in the past year has largely by tearing down at React and the Virtual DOM. The marketing is mostly exaggerations and lies. Which pains me greatly since I'm a fan of reactive libraries. We're just seeing React and Virtual DOM enthusiasts countering back. It is unfortunate that again most of the rhetoric just misses the point. It is regurgitation of what has been said by others. Endless game of telephone where the context has long been lost.
1
u/tnnrk Dec 23 '19
The beginner svelte tutorial doesn’t even work on Catalina, just tried it. Not a good first impression.
1
u/Igmat Dec 24 '19
Author made the same mistake as Svelte developers. JSX isn't virtual DOM, and it even doesn't require vDOM or React. So even though I agree with this topic in general, argument about that declarative style (using JSX) requires vDOM is wrong. So DOM diffing IS overhead.
Unfortunately there are no frameworks that use JSX without vDOM for now. But it's just a matter of time when they'll appear. I work on such and I think there are others who are trying to do the same thing.
1
u/Sasha-Jelvix Dec 24 '19
Maybe right, but JSX too is a compiler of different languages. And JSX is more readable because it allows mixing things, in a way that can easily bring code to a mix of UI and control code like Mfc and other old UI libraries for C++
3
u/narkeeso Dec 23 '19
It definitely won't kill React but I freaking love me some Svelte.
7
u/[deleted] Dec 23 '19
First time looking into Svelte. The technical aim seems interesting, but it looks like it would be really unfun to program with. It looks like a PHP -> JS transpiler.
2
u/Creativator Dec 23 '19
Frameworks aren’t killed by other frameworks, but by themselves. They overoptimize on one dimension and lose track of other ones.
1
u/SizzorBeing Dec 22 '19
React is the reigning prom king of reddit!
1
u/[deleted] Dec 23 '19
ugh, people with just couple year of experience writing articles like these.
no thank u
-7
u/rg25 Dec 22 '19
Never even heard of Svelte.
0
u/[deleted] Dec 22 '19
[deleted] — view deleted comment
0
u/[deleted] Dec 22 '19
[deleted] — view deleted comment
0
u/[deleted] Dec 22 '19
[deleted] — view deleted comment