this post was submitted on 29 Jun 2024
55 points (100.0% liked)
TechTakes
1384 readers
122 users here now
Big brain tech dude got yet another clueless take over at HackerNews etc? Here's the place to vent. Orange site, VC foolishness, all welcome.
This is not debate club. Unless it’s amusing debate.
For actually-good tech, you want our NotAwfulTech community
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Lemmy, e.g. this here site, uses React too. Probably about as weirdly as they use Rust, even as the site appears to present an ok front end.
it’d be very nice to have a progressively enhanced static frontend instead since there’s really nothing about any of this that should require JavaScript (and something like unpoly would give us react SPA style functionality strictly as an enhancement on top of plain HTML)
this might be a cool project for someone to pick up once work on Philthy gets going; most of the alternative Lemmy frontends still have an unnecessary JS framework dependency, or are lacking features for essentially no reason
The main reason companies use frontend frameworks is it's easier to continue development through employee turnover. If your app was written in react or angular you just have to hire someone who knows how those work and they can get up to speed pretty quickly. Modularity also allows for code reuse. It increases maintainability. Labor isbtye major cost of software development, so making things easier and faster to develop and maintain is better from a business perspective than ensuring your app can run on a 15 year old iphone.
If you wanna go frameworkless, JS-less, or whatever on your personal projects then fine. If you insist on it in a professional team environment, you're making everyone's lives more difficult.
I've been forced to do react for years and I still don't like or understand it. Most times plain JavaScript is easier and quicker to write and quite maintainable if people can resist the urge to take the piss with nested anonymous functions.
I honestly can't get my head around the idea that people can hit the ground running with react, but can't write unabstracted JavaScript. It's like a MotoGP rider not being able to ride a push bike.
I have, in a previous age, unfortunately been the first one to suggest react at work. it’s declarative! the mental model makes sense! it’s kind of like functional programming! why, Facebook is surprisingly good at CS, maybe we should look at graphql too since that seems like such a good fit for react
this venerable house, opulent and imperial, is a festering abomination. as soon as you run into any performance issues or edge cases with react (or far more quickly with graphql, where the edge cases include shit like authentication and API versioning), you’re going to start burning out developers doing the most counterintuitive bullshit ever invented to torture a development team. and react is structured such that performance issues will accumulate in web apps; it’s just a matter of time (and not even that much time) before they do.
that’s why the advice now is to dodge performance issues with server-side rendering, almost like your site should have been fucking static html in the first place, except SSR won’t fire up without a gigantic bundle of JavaScript affixed to it, and in general it’s another source of bugs and weird performance regressions that you now have to debug in two places
and for what? react’s DX is better than HTML and CSS until you hit a wall, then it’s much worse. you can get a fairly react-like set of functionality out of plain HTML with Web Components… except Web Components requires fucking JavaScript for no reason but to not threaten existing frontend frameworks (see our sister community FreeAssembly soon for the gigantic rant and JavaScript library I’m writing about this shitty situation)
Magnificent.
As depicted in the paintings of Heironymous Bodge.