Live data from Hacker News

Thoughts on React vs. Vue vs. Everything Else in 2023

chrlschn.medium.com

21–30 of 44 posts

Re: Thoughts on React vs. Vue vs. Everything Else in 2023

#21

Earlier quoted context omitted.

Imagine using HN as the model for web software projects.

You've been here since 2014. How much value have you derived from this code? How long would it take you to write it? https://news.ycombinator.com/hn.js

HN has been incredibly useful to me.

I'm also smart enough to know that HN caters to a very specific kind of user.

Re: Thoughts on React vs. Vue vs. Everything Else in 2023

#22

Earlier quoted context omitted.

I don't know that I prefer Sveltekit over Nextjs yet, but Svelte vs React is quite nice. But I might still use React for large projects with many components if it doesn't need animations/transitions, and the global/shared state is pretty lightweight

What would be your motivation to pick React? I'd say the ecosystem. You're really hitting a point there with the animations. Framer is cool and all, but animating exits still sucks.

I think mainly the tooling is much better in React.

I can get by with "sort-of typescript" for Svelte, but it's a bit annoying that I can't get VS code to provide type hinting everywhere, and to also enforce "no-implicit-any". In smaller projects I'm probably not touching files I've completely forgotten all the time, so it's not too much of a problem

I can deal with the fact that the tailwind extension intellisense might not work in Svelte (or it didn't last time I tried it); for smaller Svelte projects I'm happier to use component-scoped styling 90% of the time. At that point I probably haven't typed the same combination of styles enough times that I want to share them across the project.

When the project grows, these become much more of a pain. I end up with lots of small to medium sized components, and I want to compose these along with mixins defined elsewhere (utility functions that can be pulled into them, etc). At that point I really want Typescript to be as strict as possible, and I want the Intellisense on tailwind partial class names. I'm sure there are plenty of other similar tooling issues that I'm forgetting right now.

React also has many more libraries, as you said, including the wonderful Tanstack query (I know there's a Svelte engine now, though I haven't tried it yet)

But the actual framework is so much easier in Svelte, enough so that I'd almost always choose it for smaller projects. React has its pain points even at medium scale, whereas with Svelte they really hit me harder as the project gets bigger. So it probably comes down to what I'm doing.

But yeah, I'm still going to reach for Svelte the majority of the time

Re: Thoughts on React vs. Vue vs. Everything Else in 2023

#23

Earlier quoted context omitted.

You've been here since 2014. How much value have you derived from this code? How long would it take you to write it? https://news.ycombinator.com/hn.js

HN has been incredibly useful to me. I'm also smart enough to know that HN caters to a very specific kind of user.

I don't think there's a person I've asked who prefers the modern web over the way it was 10 years ago. All we've done is create a bunch of busywork that results in a cushion class of yes-men who are paid to protect the oligarchs from the peons they control. The specific kind of user you're talking about unfortunately includes these people.

If we stop navel-gazing at our salaries for a second, we should take a look at what developers who make a real difference do. I'm not talking about people who build stuff that leeches off consumer credit cards. I'm talking about TimBL, Matt Mullenweg, Bjarne Stroustrup, John Resig, Greg Kroah-Hartman, Linus Torvalds. They do things on principle, on values, and are self-confident enough not to care about chasing status. They're people who look at a world full of problems and want to actually help by sharing their ideas.

Those people generally build open, self-hosted solutions. They want to empower people, freeing us from the modern versions of AT&T and IBM. They make stuff that can run on a Pi or an old Celeron. Their stuff is standards-compliant, open, clean, simple, and user-auditable, so that it can be trusted and contributed to.

React was developed by Facebook, an app that steals your own family members' valuable time. Angular was developed by Google, and app that drains your own wallet. If you want to emulate their outcomes, by all means use their technologies. If you want to make a difference in the world, observe those who are making a difference and emulate them.

Re: Thoughts on React vs. Vue vs. Everything Else in 2023

#24

Svelte is still the best by just about every metric that matters. The consensus seems to be clear that once you get a real taste of the Svelte DX, everything else is a downgrade.

Could someone explain to me the biggest differences between Svelte and Angular? I looked into Svelte when it was first emerging and at the time it seemed a reinvented Angular.

Off the top of my head:

Angular is more like Svelte+SvelteKit. Router and plumbing included. Angular 16 adds signals, so that's a recent difference.

Svelte handles shared state+reactivity as stores. Svelte contexts allows partitioning of shared state. Reactivity comes from a small superset syntax of JavaScript that acts a bit like a spreadsheet. Svelte is a compiler rather than a full-size runtime library.

Angular relies heavily on rxjs, and synchronous vs asynchronous state is quite distinct and "boilerplatey". Switching between sync and async can be a real pain sometimes. That said, Angular is VERY opinionated, which makes it predictable from a developer point of view. (I think SvelteKit is as well, but its track record is a lot shorter than Angular's.)

Variable interpolation looks about the same, but Angular uses custom HTML attributes for control flow whereas Svelte uses syntax that's more akin to Velocity templates.

Angular still has a virtual DOM, and the smallest app bundle is still often more than a megabyte even before it hits your code. Time to first render is still pretty bad. Angular's compiler, while faster in v15-v16, is still dog slow compared to many younger frameworks.

Svelte is smaller and faster at both compile time and runtime, at least when you have fewer than 250 components, give or take.

Angular components use annotations heavily and use separate files for logic, markup, and styling. Svelte components put logic, markup, and styling in a single file but with less boilerplate. Both support two-way data binding. Angular is more mature but somewhat arcane while Svelte looks much more like vanilla HTML/CSS/JS.

Svelte CSS styles are scoped to the component automatically by default without worrying about prefixes or naming conventions.

Angular routing is more programmatic. SvelteKit routing is filesystem path-based.

Svelte has a REPL. I don't know of one for Angular.

Angular has a massive ecosystem. Svelte's ecosystem is far smaller, but integration of vanilla JS libraries is typically easier with Svelte than Angular. Still, Angular's breadth of community is undeniably larger.

Re: Thoughts on React vs. Vue vs. Everything Else in 2023

#25

> developers need to be more vigilant with React code as > articles on managing this complexity that every React developer should read Here's the thing. You can do your best to spread how things ought to be done and what people should be doing. The majority of developers are not going to be vigilant, nor are they going to read these, nor does it occur to them that they're being suffering from its complexity. In a way…

> I certainly hope so, but I'm not seeing it.

Svelte, SolidJS, and Qwik all fit that bill.

Re: Thoughts on React vs. Vue vs. Everything Else in 2023

#26
post #4

Every time I try to do something with modern JS I'm reminded of this blog post ( https://peterxjang.com/blog/modern-javascript-explained-for-... ) And also every time I end up giving up because it's so damn complex

I agree it can be very confusing to set all of this up from scratch, but if you're using something like Vue CLI, all of these dependencies and configs are generated for you.

Re: Thoughts on React vs. Vue vs. Everything Else in 2023

#27
post #24

Earlier quoted context omitted.

Could someone explain to me the biggest differences between Svelte and Angular? I looked into Svelte when it was first emerging and at the time it seemed a reinvented Angular.

Off the top of my head: Angular is more like Svelte+SvelteKit. Router and plumbing included. Angular 16 adds signals, so that's a recent difference. Svelte handles shared state+reactivity as stores. Svelte contexts allows partitioning of shared state. Reactivity comes from a small superset syntax of JavaScript that acts a bit like a spreadsheet. Svelte is a compiler rather than a full-size runtime library. Angular re…

Thanks!

> Angular still has a virtual DOM

It does not.

Re: Thoughts on React vs. Vue vs. Everything Else in 2023

#28

With H/3, modern frameworks have become unnecessary deviations from web standards that result in high costs and lower app lifetimes. Do standard server side work, don’t use node as a server, sprinkle a bit of typescript where needed, and keep things lean. As a recovering front end developer of 20 years, someone who has played with every damn framework and used most of them professionally; just stick to web standards…

What is H/3?

Re: Thoughts on React vs. Vue vs. Everything Else in 2023

#29

Earlier quoted context omitted.

HN has been incredibly useful to me. I'm also smart enough to know that HN caters to a very specific kind of user.

I don't think there's a person I've asked who prefers the modern web over the way it was 10 years ago. All we've done is create a bunch of busywork that results in a cushion class of yes-men who are paid to protect the oligarchs from the peons they control. The specific kind of user you're talking about unfortunately includes these people. If we stop navel-gazing at our salaries for a second, we should take a look at…

> React was developed by Facebook, an app that steals your own family members' valuable time. Angular was developed by Google, and app that drains your own wallet. If you want to emulate their outcomes, by all means use their technologies. If you want to make a difference in the world, observe those who are making a difference and emulate them.

They're unrelated. The tech and outcomes are unrelated. You can make great things for the world with React. Using Arc isn't gonna make Facebook a better company

Re: Thoughts on React vs. Vue vs. Everything Else in 2023

#30

> Next.js is having a moment and likely to be the platform of choice for the foreseeable near- and mid-term future in both the enterprise and startup space because React on its own is too un-opinionated and therefore, somewhat open to being misused, mis-configured, and poorly architected since there are many choices involved in any non-trivial implementation.. Lolol all those people who said React was superior to bac…

Next JS is still leagues less opinionated than angular. It's React with optional SSR and routing.
Post reply on HN