Live data from Hacker News

Introducing Svelte, and Comparing Svelte with React and Vue (2021)

joshcollinsworth.com

141–150 of 213 posts

Re: Introducing Svelte, and Comparing Svelte with React and Vue (2021)

#141
post #81

Earlier quoted context omitted.

Re: Sapper -> Sveltekit, you might say the same thing for React Router users who adopted Reach-router, back to react-router and are now on remix-router or next.js router. Also I found it weird that you mention Evan You WRT vite as a counter to why Rich might be up against stronger devs, but Rich made rollup, which was foundational to Vite's bundling.

I don't doubt Rich Harris' skills as a developper. But project governance is very different from have strong technical skills. Things like communication, prioritizing features important for the community, dealing with idiots way beyond when it stops becoming fun, gathering money, writing good documentation, etc. Rollup is cool, but it's a very different beast from a f/e framework. For a lot of projects, migrating fro…

> Migrating from svelte to react, is months if not many man-years.

I’m not sure what your argument is here, but I’m pretty sure you have it backwards.

The fact that it might take a while to migrate a svelte project to react is not because of poor documentation or tooling or communication or anything like that. It’s because so many things work out of the box in svelte, and to do the same things in react would take tons of boilerplate or third party libraries. Some things may not even be possible to port, at least not easily.

This doesn’t show that svelte is bad though. It shows that react lacks functionality and is more difficult to use.

Re: Introducing Svelte, and Comparing Svelte with React and Vue (2021)

#142
Can someone with more experience in the 3 frameworks give some insights into the type safety ergonomics?

I'm extremely biased towards react due to the fact that it effectively brings very strongly typed templates/components to the table, which has saved me easily a hundred hours of debugging/testing over the last 4 years. It also makes components MUCH more accessible due to the declarative nature of props (and their respective types).

Re: Introducing Svelte, and Comparing Svelte with React and Vue (2021)

#143
Svelte is what Ember could have been and where I suspect Vue is ultimately going (in their own flavor of course). If you really like templates and the constraints they bring over being closer to plain JavaScript, Svelte takes that to the most logical "extreme".

On the other hand, if you like leveraging most JavaScript features then React, Preact, Inferno, SolidJS and especially Lit are much closer to allowing developers to use any part of the language that is useful, with some exceptions for reactivity.

Lit in particular is 100% JavaScript primitives and very little sugar on top.

Re: Introducing Svelte, and Comparing Svelte with React and Vue (2021)

#144

Earlier quoted context omitted.

Nope, dude at my job totally got "laid off" for choosing to write a feature in an ecommerce system in React. He had used it before at a previous job and was familiar with it. Problem was: - No one else in the team was familiar with React. - React did not play nice with the rest of the app and developer work flow. - It was huge and slow - He didn't know React as well as he thought he did and we had endless bugs. - He…

This should never happen, the developers should not choose whatever technology stack or components they want for their piece of code, that's how Frankenstein started. But getting fired is reasonable in this case.

Agreed, but there must be more to this story that resulted in firing. You can't easily fire people for the issues listed here, at least in most civilized parts of the world.

Re: Introducing Svelte, and Comparing Svelte with React and Vue (2021)

#145

Earlier quoted context omitted.

Absolutely. I tried to push us to try Svelte at my last job at BigCo for over four years , to replace an internal templating system. We didn't even use React or Node yet, so not only we had to convince the old guard to adopt something new, but also deal with the React-grown crowd protesting. You can't imagine the amount of flak I've taken for that. Managed to get it on a back-of-the-house system, while we built a mas…

Man, on one hand... evaluating frameworks is just part of the job, right? Same as evaluating a vendor service, or a third-party package, or an architecture or a pattern... On the other hand, novelty burnout is a real thing. Javascript has mutated so much in a short period of time that it's become impossible to keep up with -- especially once you factor in frameworks and tooling. Times like this, I wish vanilla JS/ECM…

And if you haven't been hyper-focused on learning every bit of "modern JavaScript" in the last 5 years, employers definitely love to disqualify you just because you were happily working on "legacy tech" instead of catching up on React and every other JavaScript-heavy approach to Web development.

I'm bitter, and I'm not opposed to moving on and learning this stuff, but it's like employers barely understand the value of HTML/CSS relative to how much React is prioritized/used as a single qualifier.

I have "1-2 years experience" with React & friends if that matters, and I consider myself a 10 year Web development vet.

Re: Introducing Svelte, and Comparing Svelte with React and Vue (2021)

#146

Hooray! Yet another framework which will do what Angular already does for years.

I love the kitchen-sink and batteries included of Angular. It made our small team very productive on large projects. But I really dislike the separated component files convention. On the other hand, I love React single components but hate having to shop-around and piece together every basic platform feature.

Re: Introducing Svelte, and Comparing Svelte with React and Vue (2021)

#147
post #22

Personally to me the best framework is no framework at all. Instead I use libraries of code and Web Components. The libraries are either my own or some existing ones. Overall writing web front end this way for me is the most natural way. In my personal experience I spend less time creating the web front ends this way comparatively to when using "frameworks". No "compiling" is needed either, other then optional minimi…

I agree. The "DSL" and "compiling" aspect of frameworks scares the crap out of me frankly. And on top, it's all happening on my poor users device - well not for Svelte apparently. Let's have a look at this "compiled" JS. Here's an snippet from the volume slider in his example: function b() { v = W4(this.value), h(0, v) } I understand that this is "compiled" - but really it's not - it's EcmaScript. If I wrote code lik…

You are looking at minified output there; of course nobody writes that.

You can see the compiler output in the "JS output" tab here, it's very easy to follow: https://svelte.dev/repl/12aefec27f0d4ec5ad85ab7e5a123642?ver...

Re: Introducing Svelte, and Comparing Svelte with React and Vue (2021)

#148
post #97

"Introducing"? Hasn't Svelte existed for a couple of years already? I remember a speaker talking about it on a conference some time before Covid hit. Still, it's a great article that does a good job of showing how easy Svelte is. I think it looks most like Vue, but simpler, with even less boilerplate. Of course keeping everything so simple does make me wonder how it would deal with more complex situations where you r…

>> "Introducing"? Hasn't Svelte existed for a couple of years already?

So has your significant other at the time you introduce them to your family, right?

Re: Introducing Svelte, and Comparing Svelte with React and Vue (2021)

#149

Hooray! Yet another framework which will do what Angular already does for years.

I love the kitchen-sink and batteries included of Angular. It made our small team very productive on large projects. But I really dislike the separated component files convention. On the other hand, I love React single components but hate having to shop-around and piece together every basic platform feature.

"hate having to shop-around and piece together every basic platform feature."

Can you elaborate on what you mean by this?

Re: Introducing Svelte, and Comparing Svelte with React and Vue (2021)

#150
post #121

Earlier quoted context omitted.

What is the `10` here? Is it a reference to the literal value `10`...?

It is just an initial value.

So ref is just a state variable with an initial value of 10? How do you mutate the variable/change the state?
Post reply on HN