Preferences

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 into these blobs of non-deterministic async state with unpredictable performance.

I actually like JSX and the component model so I just use solid-js which is everything I like about react but with effortless performance and you can actually get away with never using effects so your code can actually be deterministic.


> 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 the community realizing this, but also sad that this is how things work now. The rise and fall of React will have been both a product of social media / developer celebrities.

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 most React projects are planned in months/quarters despite being built atop a mountain of third-party code, all meant to 'speed things up'.

What we do today is not faster at all, too much time is wasted on tooling and issues that arise from React's architecture (hooks, ssr, data loading, error handling, async issues, black-box performance issues, dependency hell).

SSR issues and dependency hell are not unique to React.
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.

The learning curve is steep for React, you’ll struggle without solid JS skills
You'll also struggle with solid JS skills - even the best FE devs I know, working for top tech companies, are able to produce React spaghetti.
> You can’t have an easy solution when you have tons of interaction and state.

Desktop software was never this fragile.

Fragile in what way, please specify
Some big apps are actually unusable slow for me on crazy fast hardware, I'm talking typing on textboxes not having good fps on Facebook... Fml
React was a massive improvement over Ember.js, Backbone.js and their ilk, which at the time as a young dev I couldn’t grasp by myself.

React, however just clicked. f(state) = UI just makes sense

Which is not at all how it works in practice. In a large React codebase you have state scattered throughout contexts, GraphQL caches and complex hook dependency trees.

Throw in SSR and component memoization and you really have no idea what caused a UI change to occur.

I've worked in many react codebases, some great some not, and the main predictor of the quality tends to be both the dev lead knowledge, the experience of the team and the learning vs churn out features culture. Same thing used to happen with jQuery BTW, only it was a lot easier to shoot yourself on the foot back then.

I feel like "X new library/framework's code is a mess" is the new "People don't want to work anymore" trope (that older workers have been saying for over 100 years).

Coming from the assumption that Facebook should have tons of experienced people using React, their implementation on Facebook.com just plainly sucks after 7+ years. The UI is slow, breaks back button navigation often, loads completely different views in case a tab goes into background and gets reloaded (I have multiple tabs open from FB Groups that interested me, many of them default to opening my Home feed or the Groups main page after a background reload).

If Facebook.com cannot get it right, who actually can?

"No True Scotsman" is also a trope going on for > 100 years, yet you are appealing to it.

Technology ages, I remember liking React a lot way back in the day. Things improve and circumstances change. Things like the virtual dom are just not needed anymore and I just want my frontend code to be deterministic, it's not like I'm writing a distributed system, it's a client ui. So calling React "fundamentally bad" is harsh but I think given the state of the world today it's true.
> the dev lead knowledge, the experience of the team and the learning vs churn out features culture

This could be said of any team using any technology. If the team is better at using it, and they are provided more time to use it properly, then they'll make a better product. That's not unique to React.

React sucks because its scope creep makes it difficult to maintain, and there's a pretty low ceiling for the end user's experience. Yes, better teams can make better products with React than worse teams, but that doesn't mean that either end product is any good.

Hence, Redux.

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal