Live data from Hacker News

Kind of annoyed at React

blog.cassidoo.co

71–80 of 135 posts

Re: Kind of annoyed at React

#71

Earlier quoted context omitted.

> they always devolve into these blobs of non-deterministic async state with unpredictable performance Exact same experience here. I've been banging this drum for years. When hooks came around I thought they might make it better, but alas, we are still in a downwards spiral. Building web apps is 10x more complicated today than it was ten years ago, with nothing to show for it. I'm happy to see some known voices in th…

Building web apps with React is just much faster than doing it without, even when using Angular complex apps will always be complex. You can’t have an easy solution when you have tons of interaction and state.

I started a new React project back in December after being annoyed with Angular, just to see whether it would be any less annoying and/or quicker.

It's been neither of those things and I'm actually beginning to regret making that choice.

Re: Kind of annoyed at React

#72
> It’s frustrating that diversity efforts visibly took a backseat with React leadership

Who cares?!? Imagine trying to justify your decision to choose a framework to a manager by talking about their diverse leadership.

Re: Kind of annoyed at React

#74

Earlier quoted context omitted.

If you have dozens of components with dozens of uncontrolled side effects executing in unpredictable order, then nothing is going to help you until you get those effects under control. It'll still be bad architecture with or without hooks.

> It'll still be bad architecture with or without hooks The companies I've worked with had hundreds of engineers contributing to the react codebases and people are just trying to crank out features by the deadline. I'd rather just work with tools that don't require the usage of such obvious footguns. You can code solid-js and svelte and never use effects (even though they do offer them unfortunately).

Hundreds of developers all doing their own thing sounds like a recipe for said bad architecture.

Re: Kind of annoyed at React

#75

Earlier quoted context omitted.

Some people find the mental model to be very confusing. I've been writing hooks for years so intuitively, the behavior has sunk in. But I still admit that it's mind bending to try and understand how it actually works. The original commenter is absolutely correct that it diverges from both functional and OOP, and while that's not necessarily a bad thing, it's reasonable for people to consider it a net negative.

Whats the beat resource for the mental model?

There was an article I read, maybe 3-ish years ago, that explained it very well. It had you actually build a hook from scratch (not a custom hook, like actually implementing hook-like behavior into JavaScript). It was great. I just tried looking it up but couldn't find it, if anyone knows what I'm talking about please link here.

Re: Kind of annoyed at React

#76

Earlier quoted context omitted.

> It'll still be bad architecture with or without hooks The companies I've worked with had hundreds of engineers contributing to the react codebases and people are just trying to crank out features by the deadline. I'd rather just work with tools that don't require the usage of such obvious footguns. You can code solid-js and svelte and never use effects (even though they do offer them unfortunately).

Hundreds of developers all doing their own thing sounds like a recipe for said bad architecture.

> Hundreds of developers all doing their own thing sounds like a recipe for said bad architecture

This is the how the majority of tech companies operate.

> but I know better than to single out the tool for every judgment on design.

I disagree, most react developers are not even aware of this massive foot gun. I do blame tools for problems that are completely avoided by other tools, we can just consider this a difference in philosophy but I prefer to use tools that make as many types of mistakes impossible as they can.

Re: Kind of annoyed at React

#77

React is fundamentally bad technology. I know there are historical reasons for the virtual dom but the reasons that justified it don't exist anymore. If you want to do anything interesting with react that involves interacting directly with browser APIs you need to deal with these absurd use effect hoops to initiate state with references to dom nodes. I've worked on 4 large react code bases and they always devolve int…

Hence, Redux.

Re: Kind of annoyed at React

#78
A couple of things make React extremely valuable to me:

- The functional programming model (State => UI) allows building very complicated interfaces in a very simple way, by defining dependencies with useEffect() and other hooks. It can take years to master it, but when you develop complex apps where all kinds of state needs to update when some other state changes, you really appreciate how simple it is to do with React.

- React is very backward compatible and allows you to migrate codebases to newer React features slowly over the years, while already using those new features in other parts of the code. (I still have some class-based components here and there.)

- There is a huge ecosystem of existing React components and tools you can use in your applications. They make it a very productive environment to get stuff done quickly. Frameworks like Next.js make it a breeze to develop and deploy static apps e.g. to S3.

- You can apply your existing React skills to React Native when you need native apps.

Re: Kind of annoyed at React

#79

Earlier quoted context omitted.

Building web apps with React is just much faster than doing it without, even when using Angular complex apps will always be complex. You can’t have an easy solution when you have tons of interaction and state.

What else have you personally had experience with? Angular would not be in my list of better alternatives. My comparison is always with Svelte / Vue, and also what we had in previous eras (Backbone, Knockout, etc). HTMx is picking up steam too. We used to push out interactive UI in days/weeks, and mind you, in the past websites did not look all the same. There were no component libraries to start from. Today it seems…

SSR issues and dependency hell are not unique to React.
Post reply on HN