Hacker News new | ask | show | jobs
by simonsarris 1062 days ago
haha, I basically feel this way about Svelte/Kit. It's not mature, but the surface is so small and learning curve so pleasant that it's our go to choice now for internal webapps.

(We have no external webapps because my company, funny enough, builds a JavaScript framework!)

3 comments

> not mature

Svelte was first released in 2016 and has become bigger than its original creator, Rich Harris. It has quite a thriving ecosystem and a big community. The tooling around it is more mature than React's has ever been.

> surface is so small

I actually find the opposite to be true. React still has a relatively small API surface area. One-way data flow makes it easier to understand. However, a smaller surface means arguably less expressivity, so I think Svelte's bigger learning curve is worth it. You can learn about 90% of React in a weekend and be productive. You can learn about 20% of Svelte in a weekend and also be somewhat productive, but you need to learn about 60-70% more to use Svelte as it's intended, rather than as a React alternative.

I think Svelte has a much smaller learning curve, personally. If you know Javascript there's hardly anything to learn.
This is wrong in so many levels. You need to learn useState,useEffects in react.

You only need to learn how to put {varName} in svelte.

useState and useEffect are quite simple small elegant API. It does not mean it's very easy to use for newbie. Maybe like Lisp?
Oh sure, useState and useEffect are very simple. Your app built upon them, on the other hand…
You don't need to learn useEffect until you need to plug arbitrary js libs and components into react. That's the intended use of useEffect. Using it for anything else is usually a bad idea.
How can you "fetch something when your state change ?". It's the main use case for useEffect.
You can just trigger fetch in the function that does the state change.
Agreed, this is the correct approach. Overusing effects makes control flow difficult to understand and has many unintended consequences. The misuse of effects is so widespread the React team had to address it with Strict mode in React 18.
How is Svelte intended to be used that is so hard to learn?
I'm not a web dev anymore, I stopped right around the time hooks became a thing in React, and while Svelte was an exciting technology no big players had adopted yet. In fact the last thing I did for my old job was a little make-work exploration to test whether Svelte was was ready for them to use in prime time. My conclusion was that it was remarkably slick and empowering, but was not ready yet due to the lack of ecosystem support. It's cool that Svelte and its community has continued to grow to the point where it is a legitimate contender. I'll be honest, I never liked React very much and would love to see it dethroned, even though I have almost no stake in that anymore!
I’ve been working with Svelte very heavily since November of last year. It’s been a real journey with Svelte and SvelteKit over the last 7 months, seeing things change rapidly. I think one of the coolest things is that it has galvanized frameworks to become SPA framework agnostic.

Like NextAuth.js -> Auth.js React Query -> Tanstack Query

So at the very least, I think we are probably headed towards a plurality where it is practical to use Vue, React, Svelte or Solid though I do hope Svelte “wins” in the end.

I have to say, I still don’t think it’s to the point where it can be foisted on a team of mediocre developers in some kind of enterprise setting. Some of the libraries that exist for SvelteKit that I consider super critical are very small and maintained by one or two people.

I recently took on some freelance work for the first time in like 6 years, just to work on another large SK codebase and saw a lot of the same problems I encountered approached differently. I think there’s some key things that need to make it into core still.

> lack of ecosystem support

.. is the “Nobody Got Fired For Buying (IBM|Microsoft|Cisco)” for the 2020s

How's Svelte different from AngularJS 1? I have such bad memories that I refuse to touch any code-in-html framework with a 10 foot pole.
https://component-party.dev/

Long-time Java dev by background, used more frameworks than I could possibly list. I won't touch React with a ten foot pole.

SvelteKit is the first web framework I ever used that I enjoy working with.

Doesn't sound like a very promising company if your own developers rather use a different framework than dogfood their own. Isn't that kind of admitting defeat?
We develop and sell a visual Diagramming library, not an SPA framework. There is no overlap.