Live data from Hacker News

React is holding me hostage

emnudge.dev

441–450 of 553 posts

Re: React is holding me hostage

#441

The snark is strong with this one. It's a pretty major rant, without putting forward an alternative. The only viable alternative for me personally is VueJS and that's not my cup of tea either. I like React. It makes sense mostly. Is React perfect? No. Do I like React's recent transition to focus server side? No. But the problems it addresses are tough to solve. Show me a better solution and convince me its tangibly b…

Solid.js?

No, sorry. Not close. I like solid but accessing dom is a mess that I'd like to avoid.

Re: React is holding me hostage

#443
post #45

For reasons that I can't quite explain fully, I like angular much better. For me it's a shame that react won the battle and is used at every company now.

Angular seems like a step back to me. The MVC thing, while fine, introduces extra hiccups. Creating generic UI components is pretty tiring and using Angular material is pretty much your best option.

Upgrading to newer versions is a pain and also finding well supported third party libraries. React is much easier to work with since you don't always need to reinvent the wheel for time consuming things.

Hooks and simple state management with Jotai are also much nicer to work with than RxJs. RxJs requires a strange mental model and a lot of verbose code and functions.

Angular is kinda like Java, more code for less features. Great if you don't wanna think, meh if you want something exciting and new.

Re: React is holding me hostage

#444

I’ve happily used MobX for years. It comes with its own quirks but almost completely bypassed the awfully awkward state management that is React. Made my life 200% more enjoyable!

If you use Typescript, take a look at: https://mobx-keystone.js.org/ It's an additional layer on top of MobX that adds strong typing. I've been using it for an open source video annotation project and it's been amazing for keeping track of local state, cascading calculations of things. Here's my "models" directory for it if you want a taste of how it works: https://github.com/Rodeoclash/vodon-player/blob/main/player/…

Thank you! If only I had been a better programmer back then I'd probably have opted for a solution like this. Instead I had worked out through the year and made some highly custom system that resulted in very similar patterns. Too ingrained in my app now to consider new options but might be a good idea to build on top of those next time around!

Re: React is holding me hostage

#445

I'm still a React guy. I've also worked with Angular and Vue and toyed with Svelte. People tend to compare these frameworks on things that don't matter - often it's performance. We used to compare React performance to AngularJs performance too, which was meaningless. VDom is nice. Reactivity in signals is nice. Limiting rerenders is nice. But I choose frameworks because of developer ergonomics. The killer feature for…

This thinking is why most SPAs are utter shit for the end user. Most developers are so happy about their ergonomics and how cool their tools are and don’t care at all the application uses 200M on your browser and every key stroke takes 200ms to show in an input.

This also happens in the backend, but the difference is that the company país the price in the form of more infrastructure. But in the frontend is “free” so why care at all, right?

Re: React is holding me hostage

#446
post #292

Earlier quoted context omitted.

Performance of frameworks is often irrelevant for products/applications. 1. Performance is very very rarely a contributor to a product success. Users prefer more features over more performant app all the time (both directly when asked and indirectly by what products they choose). 2. Rendering/client computation speed is rarely a contributor to real and perceived performance. It's almost always the async calls - how m…

> Performance is very very rarely a contributor to a product success. Users prefer more features over more performant app all the time (both directly when asked and indirectly by what products they choose). Yet this is what all the JS people were saying in 2014 - 2015 when everything started to become SPA. They argued this is what the users want. That's been used to justify all this stuff for a very long time if you'…

Rerendering on the backend can actually be faster than doing AJAX calls because the BE has to send a lot more data than if it's server rendered.

I

Re: React is holding me hostage

#447
post #216

Earlier quoted context omitted.

> the modern webapp experience is so miserable for the average person. I see this claim a lot and I'm curious what this is based on, can somebody drop some links to further reading?

I have a beefy machine and fast internet. Yet, JIRA is annoyingly slow. Half the time, pages on my bank’s website take forever to load, or don’t load at all. I don’t have any numbers, just some anecdotal experience like the above. It is not just speed. The UI of many sites suck too. Amazon, GoDaddy, for example. Then there are ads. We don’t see ads in between content anymore. It is content within ads these days. I am…

Most of JIRA being slow is the backend not the FE. I've had the same issues but you can watch the backend take 3 seconds to return. The FE isn't much of a factor there.

Re: React is holding me hostage

#448
post #216

Earlier quoted context omitted.

I have a beefy machine and fast internet. Yet, JIRA is annoyingly slow. Half the time, pages on my bank’s website take forever to load, or don’t load at all. I don’t have any numbers, just some anecdotal experience like the above. It is not just speed. The UI of many sites suck too. Amazon, GoDaddy, for example. Then there are ads. We don’t see ads in between content anymore. It is content within ads these days. I am…

In the case of Jira, how much of that is related to frontend code, compared to backend code / inefficient queries? I find performance suffers mostly when media assets, advertisments, marketing and tracking scripts etc. come into play. The frontend rendering rarely makes a dent at that point.

The FE is like 5% of the slowness if that. You have a 2 second query and then 50-100ms to render.

Re: React is holding me hostage

#449

Earlier quoted context omitted.

"Doesn't reinvent the wheel" they literally created a whole new language called JSX, I have 13 years writing JS and I dislike React and JSX is one of the reasons. As far I can tell reason it's picked a lot of times now it's market share, people see that is more popular than the competition so they try to learn it, creating a feedback loop that just makes it more popular.

JSX isn't a new language, it's syntactic sugar for React.createElement() or whatever other pragma you prefer (like the Preact or Vue equivalents).

Call it what you want, still is the worst kind of syntatic sugar, the one that forces me to use a transpiler but its full of footguns, like being unable to use "class" for the "class" attribute and I have to use className instead, or the one that has no syntax sugar for conditionals so instead you write horrible stuff like {isValid && isApproved && foobar && ...}

Re: React is holding me hostage

#450

Earlier quoted context omitted.

Same. We've been working on a huge React project for several years. Lots of graphs, 3d models etc ... and it is super-snappy. Only slow part is a WebGL-based chart component that visualizes 2-3 M rows of signal data. We can probably decimate the signal data to improve performance, but that has got nothing to do with us using React. N.B. No one is using the app from their mobiles. iPad and computers only. Our reasons…

Modularization. With React, you can delegate a component to one team and use it as a web-component. Actually, why aren’t web-components a thing, that’s another story. But componentization is why React creates clean code.

I make this argument all the time and people think I'm an idiot, which is fine. But JSX to me is reason that Svelte and Vue aren't as good. They are faster IMO but with JSX it's nice that you can make a form and then each part of the form can be broken out into separate methods.

The reasoning I get all the time is "Why would you want to do that? That's stupid".

It's just so much nicer honestly. I'm not a react fan at all but that's one thing I miss about it.

Post reply on HN