Live data from Hacker News

React is holding me hostage

emnudge.dev

201–210 of 553 posts

Re: React is holding me hostage

#201

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…

> But I choose frameworks because of developer ergonomics. I understand that sentiment, but it's part of the reason why computers today don't feel faster than in the past and why we waste sooooo incredibly much energy.

I don't think the sentiment in itself is harmful. I agree with the conclusion, but I believe the problem is, there is so much accidental complexity built into this space. Path dependency makes it hard to get rid of it, so rational developers and start ups end up contributing to the problem.

Re: React is holding me hostage

#202
post #37

Earlier quoted context omitted.

setState is a convoluted way of passing the newState to components. useEffect is a side effect and if you use it you're gonna have a bad time.

If you need to fetch a piece of data when the component loads, how do you do it without useEffect?

You don't do that.

Why would fetching data depend on whatever is being rendered?

You know what data you need or not need before rendering anything, or you will be in a world of pain.

Re: React is holding me hostage

#203
post #195

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…

You'll need some data to make those claims.

[deleted]

Re: React is holding me hostage

#204

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…

> When using React I usually just use MobX and everything just works.

Same. React as a UI library is great. React as a state manager (hooks) or a framework is (hooks or hooks+next) is not good. Writing and fusing business logic to a framework is always a bad idea

Re: React is holding me hostage

#205
post #197

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?

It feels like a myth to me as well. We, tech nerds, value "optimized" solutions, "beautiful" code. We buy top-notch hardware, remove bloatware, because we really care about our tools and craft. 90% of the users use shitty hardware. Everything is sorta sluggish on their computers - they boot up slowly, the bunch of crapware in autorun take their sweet time to load & phone home, their wifi us overburdened with devices.…

Doesn't that have a corollary: if their web app is faster than everything else they use, won't they love it?

Anecdotally, those 90% of users are not happy about their experience, they just tolerate it.

Re: React is holding me hostage

#206
> Frameworks like Preact, Vue, Angular, Marko, Solid, and Svelte have all adopted some form of fine-grained reactivity. They’re called signals, stores, or observables. The semantic differences might be important, but I’m going to refer to the concept as a signal.

I would call this concept noodle. Because when there's a lot of them you get back your tasty spaghetti. The whole reason for React was avoiding it whenever possible.

Re: React is holding me hostage

#207

Earlier quoted context omitted.

How is performance not important in this context? React is very sluggish when updating many elements at once, for not very large values of "many". With some regularity, I've debugged React+MobX jank issues where a bigger update, such as switching from one panel to another, takes upwards of 200ms on a mid- or low-range machine. None of this is perceptible on our beefy dev boxes, which is why I think people disregard i…

> 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?

Buy the average $400 windows laptop and $250 android phone and you'll see.

Re: React is holding me hostage

#208
I don't understand the animosity around useEffect. It executes a function based on a list of dependent variables. That's it. Once you understand that, its purpose becomes very clear.

You don't want to rerender? Use useEffect with an empty array! Or don't use any state variables!

You want to show something new to your customers / users without rerendering? Well sorry, that's impossible, regardless of any framework you use and you should go back to UI development 101.

Bottom line: if you write clean code and are aware exactly of what your local state / redux variables are (or whatever state management you are using), you should never have a problem with too many rerenders. I've been writing React for 6+ years now and have NEVER had to reach for useMemo or useCallback.

Re: React is holding me hostage

#209

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…

How is performance not important in this context? React is very sluggish when updating many elements at once, for not very large values of "many". With some regularity, I've debugged React+MobX jank issues where a bigger update, such as switching from one panel to another, takes upwards of 200ms on a mid- or low-range machine. None of this is perceptible on our beefy dev boxes, which is why I think people disregard i…

It's because these things are chosen across a perceived axis of "developer comfort/productivity", and UX (if it is considered at all) is an afterthought.

Re: React is holding me hostage

#210

I've been feeling the same sentiment as the author. Having worked on 3 sizable React projects now (all started before I arrived), I can only conclude that beyond a toy phase -- once you have many hands working on React and *particularly* once you start managing sizable state -- there is only pain. The most recent case resulted in spending quite a bit of time explaining to a peer why we were experiencing an unexpected…

Calling React the next IBM is giving React way more credit than it's worth. Sure, basic knowledge of React will land you a frontend dev job pretty much anywhere in the world. However most of that work will be maintenance. If anything React is the new PHP.
Post reply on HN