Hacker News new | ask | show | jobs
by gulugawa 5 days ago
I agree that Meta is not uniformly bad, but I would not consider React to be a great tool. Every React project I worked on has turned into an unmaintainable pile of spaghetti.
1 comments

I was going to say, isn't React something to hold against Meta? Being intimately familiar with it, I don't consider it a positive contribution to the world.
I work in film, not software engineering, but I've heard lots of shade thrown on React for a long time, mostly for this reason- messy code.

The question I have is, does React somehow encourage or enable code that is messier than in other frameworks? Why is it so popular if it's so widely hated? There's something I'm missing here.

Facebook spent a lot of effort marketing React, and there are widespread misunderstandings about React that made it popular. One of the most hyped features of React was a "virtual DOM" that supposedly improved rendering speed, but actually did not significantly improve performance.

Rendering a UI should be quite fast, even for a complex web app. Noticeable slowness in the UI is due to poorly optimized rendering, or logic that has nothing to do with rendering.

Nowadays, it is considered a default choice for a UI framework.

It's got a number of really nice Quality of Life (QoL) features, but who's going to go into the Internet and be positive about something? At best you'd be called a shill or astroturfing. If it's the younger crowd they'll be sure you call you cringe. So why would you hear anything positive about React. Or life in general when you can just be negative? That has a number of broader implications for society that aren't get to get solved here.

As far as React goes, it's composable, which means I can create a <PreferencePane> and then put a <CameraPref> inside that, and then later on in a wizard, I can put the <CameraPref> and it's totally fine. This means I don't have to write the same fucking code, ever. If the people im working with know their shit, as the progtammer, I never have to see the css/stylistic code/elements unless I go looking in another file for them. No shit the CSS is a distraction when I'm trying to write a code that is not CSS. It's all JavaScript. This is a good thing, but people that grew up hearing that JavaScript sucks have never challenged that successfully, so having React forced upon them just sticks in their craw. This is a good thing because JavaScript runs on bother the server and the client/your laptop, so as the programmer, you don't have to switch contexts as your work on the app. Before this current bout of "you will all lose your job to AI" there's always been waves of newcomers too the field that "didn't know what they were doing", and that we were supposed to shun them for it. (And that JavaScript was was only for noob designers.) So you have to balance everything you hear with that sort of negativity. If everyone your age minus 10 was here to take your job and will work for $200k less a year, and they started learning react the year it came out, same as you, how do you think FilmNews forum would sound? The film industry banded together to ban AI script writing and other tools, so we'll have to see how that pans out. React is fine. Any large app is just going to be messy. And proprietary. Open Source is great, but the number of success stories are few, and not at all replicable. (If someone has a project with one that isn't "sell support", I'm all ears.)

The fact that people bitch about it is a good thing. It's when they don't that Facebook needs to worry about things. (Oh yeah also it's from Facebook, and that's not exactly an industry neutral employer. As we see here. If someone told you they work at Meta, what, are you not going to sleep with them? Two million dollars of RSUs buys a lot of not giving a shit. What are we going to vote to underfund the bus they already don't take, that we also don't take?)