←back to thread

Svelte 5 Released

(www.npmjs.com)
390 points begoon | 2 comments | | HN request time: 0.019s | source
Show context
levmiseri ◴[] No.41890499[source]
I can wholeheartedly recommend Svelte. As someone who can only do vanilla HTML/CSS/JS, it lets me build projects quickly and efficiently without having to learn something complex like React. Case in point this silly side project made in Svelte over a weekend: https://meoweler.com
replies(9): >>41890619 #>>41890752 #>>41891836 #>>41893235 #>>41893443 #>>41893762 #>>41893999 #>>41894401 #>>41900943 #
incrudible ◴[] No.41893762[source]
> vanilla HTML/CSS/JS

...but that's what Svelte is not. The techniques you adopt won't transfer over to vanilla HTML/CSS/JS without the magic Svelte compiler. These habits will become crutch when Svelte inevitably goes the way of every Javascript frontend framework.

> something complex like React

React is not that complex, certainly not more so than Svelte. It's hard to wrap your head around some behaviors, but at the end of the day, it is really just Javascript/Typescript. It is programming. As a programmer, I want to spend most of my time programming in a programming language, not so much of it configuring the Rube-Goldberg machine that is HTML/CSS. Your mileage may vary, of course.

> this silly side project made in Svelte over a weekend

I will admit, that's what Svelte excels at.

replies(5): >>41894007 #>>41894339 #>>41894461 #>>41894670 #>>41905186 #
lofaszvanitt ◴[] No.41894007[source]
It's a bloated, unnecessarily overcomplicated piece of trash.
replies(1): >>41894207 #
martpie ◴[] No.41894207[source]
That the whole industry embraced. Not bad for a piece of trash.
replies(2): >>41894452 #>>41896075 #
throwawayie6 ◴[] No.41894452[source]
As someone who had to work around the bugs and limitations of IE6 for years in the enterprise, popularity is not a measurement of how good a technology is.

The reason React is "embraced" by the industry is that it is widely used, not because it's the best choice. This lowers the risk for companies that can replace its developers with another easily. I'm not saying it's as bad as beeing stuck with a stale IE (yet), but there are surely good alternatives out there.

"Nobody has been fired for choosing IBM", was a saying that applies to React today

It has reached the "IBM" point where it's so widely used, that it has become the most rational choice for enterprise.

We have to wait for a few years while smaller businesses who don't have (or care about) the same risks uses better alternatives until they reach the point where you are not blamed for choosing something outside the box

replies(1): >>41894795 #
1. spoiler ◴[] No.41894795[source]
> The reason React is "embraced" by the industry is that it is widely used

That looks like tautology to me. What point are you trying to make with this?

Comparing IE6 and React is _hardly_ a fair comparison. One was a Trojan horse injected by corporate policies and ACLs, while React gets explicitly chosen by teams. And... Yes, there _is_ a reason why nobody gets fired for choosing React: it's not a bad choice! Is Svelte a better choice? Not universally. Unfortunately—like with many things in our field—it comes with trade offs and the answer boils down to "it depends" again.

React has its quirks, but "hating" on a library because it was part of a dumpster fire project doesn't mean the library is bad, just that people using it weren't competent with it (not necessarily incompetent in general).

Vue, Svelte, Leptos, Solid, Elm. I've seen all of them used as dumpster fire fuel, and it was hardly the library's fault.

replies(1): >>41899218 #
2. throwawayie6 ◴[] No.41899218[source]
I do not hate React and am not the person who made the dumpster fire argument. The original person complained about React, and another person used popularity as a counter argument. That was what I replied to.

> That looks like tautology to me. What point are you trying to make with this?

React is in a place now, where it is the "safe" default choice for Enterprises. It's not necessarily a bad choice, but I argue that risk management is often an important part of deciding which tech to use.

It got to this point by being backed by Meta and was a genuinely good alternative to other frameworks at the time. But it is my view that enterprises prefer React not because it is the best, but because it is good enough and easy to find workers with experience. This is a self reinforcing feedback loop.

I worked in a sales driven startup some years ago and got to shape the technology as the first hire and only developer for a few months. I chose React because it was easier to recruit for and time to market was important. If I had already a team of developers with experience with another framework, I would have chosen that one even if it had been a less popular framework due. Time to market was our main focus.

More established companies don't have the same time constraints and are often more concerned about scaling up with multiple teams. A less popular framework is a bigger risk. It is "easy" to hire 10 people for any framework, but what about 100?