Live data from Hacker News

Kind of annoyed at React

blog.cassidoo.co

61–70 of 135 posts

Re: Kind of annoyed at React

#61

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…

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 anymor…

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.

Re: Kind of annoyed at React

#62

The React ecosystem has been trying very hard for a long time to enable developers to write code that is objectively bad, vis-a-vis colocation of concerns all in a single bigass, hard-to-understand function. Hooks were last straw for me, but the trend began before that. React components should be simple stream transformers, nothing more. Accept props as input, produce deterministic HTML as output. All that other crap…

What you're proposing sounds nice in theory. But interactive UI code is always kind of a mess. In my experience react is a very good middle ground.

And nobody is forcing react developers to mix too many responsibilities into one component.

Re: Kind of annoyed at React

#63
post #14

Alongside the work on server components, they also deprecated Create React App, which was previously the official way to create new apps for development, and which had pretty good ergonomics. However, you won't find that documented on the actual CRA site - when you go looking for why your dependencies are out of date, you'll find references in obscure GitHub issues: https://github.com/reactjs/react.dev/pull/5487#issu…

Vite is the new unofficial CRA. Superior in nearly every aspect.

Re: Kind of annoyed at React

#64
post #10

Maybe, it's just me - I miss the good old days when sites didn't have anything to do with react or similar. Everything was just plain old hyperlinks and some basic JS. I am not even talking about the 90s, just look at what Facebook used to be in its early days - such a simple UI, just based off of hyperlinks, very basic JS. That simplicity alone made it such a joy to use. Today, I don't even feel like logging into Fa…

I miss the good old days without the internet.

Re: Kind of annoyed at React

#65
post #34

Nextjs is pushing for the server components and I don't really blame them for doing so. Netlify is trying to back anything that's not nextjs. If anything I'm kind of surprised that big cloud players are completely ignoring this market right now.

The more I get into RSC I have the feeling their main purpose is to pump up Vercel bills. A reason to buy more of their expensive compute resources.

They are nice in theory, but I don't see that many benefits over simple SSR, or the more traditional concept of server generated HTML with interactive islands.

Next.js applications often feel way less responsive than SPAs with proper pre-rendering on first load.

Re: Kind of annoyed at React

#66
post #62

The React ecosystem has been trying very hard for a long time to enable developers to write code that is objectively bad, vis-a-vis colocation of concerns all in a single bigass, hard-to-understand function. Hooks were last straw for me, but the trend began before that. React components should be simple stream transformers, nothing more. Accept props as input, produce deterministic HTML as output. All that other crap…

What you're proposing sounds nice in theory. But interactive UI code is always kind of a mess. In my experience react is a very good middle ground. And nobody is forcing react developers to mix too many responsibilities into one component.

Nobody's forcing them, no. But often there isn't anyone preventing them, either. React happily hands these developers enough rope to hang themselves.

To be clear: I don't mind React per se. Some of the best UI codebases I've worked in were React -- they just had a very strict separation of concerns and one-directional data flow via something like MobX or Redux. All the business logic was kept separate from the UI. But that's not fashionable these days.

Re: Kind of annoyed at React

#67
We use Preact nowadays. It feels so much better and intuitive having first class support for ESM and use the browser's technologies for events, for instance. The TSX to JS transpilation is a bonus.

In general, for us: the Vite + Preact team feels just right.

Re: Kind of annoyed at React

#68
post #63
post #14

Alongside the work on server components, they also deprecated Create React App, which was previously the official way to create new apps for development, and which had pretty good ergonomics. However, you won't find that documented on the actual CRA site - when you go looking for why your dependencies are out of date, you'll find references in obscure GitHub issues: https://github.com/reactjs/react.dev/pull/5487#issu…

Vite is the new unofficial CRA. Superior in nearly every aspect.

Man I agree with all your comments so far. You get it!

Re: Kind of annoyed at React

#69
post #62

Earlier quoted context omitted.

What you're proposing sounds nice in theory. But interactive UI code is always kind of a mess. In my experience react is a very good middle ground. And nobody is forcing react developers to mix too many responsibilities into one component.

Nobody's forcing them, no. But often there isn't anyone preventing them, either. React happily hands these developers enough rope to hang themselves. To be clear: I don't mind React per se. Some of the best UI codebases I've worked in were React -- they just had a very strict separation of concerns and one-directional data flow via something like MobX or Redux. All the business logic was kept separate from the UI. Bu…

I have to say that I've seen Redux being abused until insanity (and probably misunderstood) much more often than hooks. And much harder to clean up that mess, because it's a centralized mess. The hook mess is usually decentralized and can be improved incrementally.

What kind of frontend stack would you recommend that enforces keeping some meaningful separation of concern, without limiting productivity?

Post reply on HN