After 7 Years of React.js Love,I tried Svelte and I have to admit Its Awesome
5 comments
I don't want to mindlessly just engage in a 2-minutes-of-hate here, but I absolutely despise that React.js has become the standard in so many companies without them really without examining the alternatives. React.js isn't particularly fast, organized well, or pleasant to work in. The amount of hoops you have to jump through to solve what should often be simple problems is a sick joke on the industry. Any company that adopts Svelte (or other better-than-react alternatives like Mithril.js) will run circles around their competitors.
being too early and being wrong is the same thing.
even if svelte is better than react (which i'm not conceding yet), the tooling and resources around react are just unmatched. You'd loose so much velocity and/or capability by doing Svelte that you wont be running at all
even if svelte is better than react (which i'm not conceding yet), the tooling and resources around react are just unmatched. You'd loose so much velocity and/or capability by doing Svelte that you wont be running at all
> the tooling and resources around react are just unmatched
This is a fair point to bring up and might be the main advantage of React at this point. But as a counterpoint to that, part of the reason that the ecosystem around React is so well-developed is that React itself (in its specific role as a sort of view layer) has like 80,000 libraries and design patterns for lots of necessary tasks like state management. And because React has been around so long, many of these resources and tutorials are out of date or otherwise questionable.
Whereas going into something like Svelte, you know that almost certainly you're going to use the built in stores and it's likely going to work perfectly for the overwhelming majority of common use cases. Does it really matter if the Svelte ecosystem is smaller and less developed if the right way to proceed in virtually any project is much clearer?
React is certainly "safer" in a sense, you're never going to get in trouble with your boss for choosing React, just about anything that you'll ever want to build with React has been proven as workable, you'll always have 18 dozen libraries to solve just about any problem, and you'll always be able to easily hire a pile of developers when needed.
I don't know if there's an objective right answer because every situation is unique and we're sort of dealing with an opinion, but I know which way would increase (this) developer's happiness level.
This is a fair point to bring up and might be the main advantage of React at this point. But as a counterpoint to that, part of the reason that the ecosystem around React is so well-developed is that React itself (in its specific role as a sort of view layer) has like 80,000 libraries and design patterns for lots of necessary tasks like state management. And because React has been around so long, many of these resources and tutorials are out of date or otherwise questionable.
Whereas going into something like Svelte, you know that almost certainly you're going to use the built in stores and it's likely going to work perfectly for the overwhelming majority of common use cases. Does it really matter if the Svelte ecosystem is smaller and less developed if the right way to proceed in virtually any project is much clearer?
React is certainly "safer" in a sense, you're never going to get in trouble with your boss for choosing React, just about anything that you'll ever want to build with React has been proven as workable, you'll always have 18 dozen libraries to solve just about any problem, and you'll always be able to easily hire a pile of developers when needed.
I don't know if there's an objective right answer because every situation is unique and we're sort of dealing with an opinion, but I know which way would increase (this) developer's happiness level.
May be,
React itself go through lots of transitions like, class-components to functional to hooks. Svelte is in early stage, so I am sure there will be changes in svelte as well. And I don't care about performance that much because Browsers and devices always getting better. But Having said that, React's DOM thing always add constraints, like you can only use react supported ui-lib because everything should be in react's tree. Pure HTML and web-components library is very hard to handle with react.
You can pass class names to child components in Svelte if you bind the child component's props with restProps: https://svelte.dev/repl/c16aa7a6ef714067af6f5eee0a0f453c?ver...
Yes, I know that, but I think you have to use :global operator and combining it with parent scope class, which is extra steps in Svelte
[deleted]
Yeah, Svelte is Good. if community accepts it, It can be a good alternative for ReactJs
Agree!
Try Vue 3 with script setup.
Sure, I will, I know they out performed in benchmark but vue3 has web-component support?
* Cons for Svelte - If you are not using tailwindcss then you are going to miss passing className prop from parent to child in svelte - Reactjs has better Community and IDE Support, although my Neovim setup work like charm for Svelte, I still think react will be better for this case