Live data from Hacker News

Things I wish I knew before moving 50K lines of code to React Server Components

mux.com

411–420 of 540 posts

Re: Things I wish I knew before moving 50K lines of code to React Server Components

#411
post #362

Earlier quoted context omitted.

I'd love to investigate that, honestly. I loved Angular v1 (Angular.js now, I think?) and even that was way cleaner and more opinionated than React. I haven't tried modern Angular in a while. But Next.js reminds me of a lot of the things I loved about early Angular and disliked about raw React (which always was more of a UI lib than a proper framework). Have you tried comparing them in particular?

My most recent use of Angular on a project is using v13 at the moment. I've been doing more infrastructure work lately, and Angular's build times—and bundle sizes—have been a persistent sore spot for me. I keep eyeing v16 jealously since it uses signals, builds A LOT faster, and removes some more boilerplate code in components, and the output assets are pleasantly smaller. I haven't tried Next.js myself though a cowo…

Cool. Thanks for the endorsement! Maybe it's time to build a hello world in modern Angular and SvelteKit and compare both to Next.

Re: Things I wish I knew before moving 50K lines of code to React Server Components

#412

Earlier quoted context omitted.

Exactly! These frameworks enable people with 6 months of "software developer" education to enter the industry and enshitificate our careers with their minimum wage level understanding of actual software engineering, dragging all of us down to their salary level.

> with their minimum wage level understanding Please don't do that; it's effectively turning "makes minimum wage" into an insult. There are plenty of people that earn minimum wage that are good people, doing their best, and (in many cases) doing a very good job. This is exactly the kind of wording that turned various minority terms into insults, as we shouldn't be doing it.

I see your point, but in my case above the term usage is correct. By stating "minimum wage level understanding" I am equating the work they do to be equal to what a untrained minimum wage employee is expected to be able to accomplish. These "boot camp developers" are not engineers, and are barely developers at all. They are logical pattern repeaters, with an extremely short list of logical patterns they know how to use. Presented with the open ended work actual software developers are commonly tasked, they reach for an ungodly large number of supports and produce these modern code crap piles that are growing oversized data centers, duplicating all over the landscape. They're fantastic for selling more servers, and that is about all these boot camp developers are good for - we end up cleaning up their crap piles anyway.

Re: Things I wish I knew before moving 50K lines of code to React Server Components

#413

Earlier quoted context omitted.

If only there was a way to programmatically reproduce the conditions under which the problem appears and then exercise the behaviour that triggers the bug. Then some code could verify whether the problem still appears. Once the problem is fixed this same “test” dark magic could help ensure the problem does not occur again. Pipe dreams, my friends. Pipe dreams.

`git bisect` with an integration test suite of the backend running in a test environment can get you pretty close.

Yeah I was being sarcastic :)

Re: Things I wish I knew before moving 50K lines of code to React Server Components

#414

Stop a second before you go into RSCs. Whatever you want to achieve ultimately is much easier/quicker/scalable done in real fullstack (or classic web-) frameworks! Rails/Django/Laravel/… + Turbolinks/Htmx/… or even sprinkle some light clientside JS for fancyness. Or go best-of-all-worlds if you happen to know Elixir/Phoenix. But don’t continue the descent into RSCs, now matter how many people tweet about it. These fo…

Indeed, RSC reminds me of CORBA [1]. CORBA is a way to mix local components with remote components. CORBA is very mature and works in many languages. So why doesn't everyone use it? I would guess that most developers today have never even heard of it. Why is that? I would suggest that anyone who wants to invent another distributed component architecture should study CORBA and its descendants and why they have never r…

CORBA is one of the few technologies purposefully designed to violate both the entirety of the Fallacies of Distributed Computing and the CAP theorem. It's a case study in awful ideas, week long troubleshooting nightmares, and angry customers.

You don't hear about it for the same reason it's impolite to talk about your top 10 favorite snuff films with customers. There is no situation where it's appropriate and anyone flirting with the notion needs to be dismissed before they doom your company.

CORBA is pure evil and you should not speak its name so lightly.

Re: Things I wish I knew before moving 50K lines of code to React Server Components

#415

Earlier quoted context omitted.

Got it. Thanks for the thorough explanation

You bet. But if you grok that simple example, you can see why teams that switch to Svelte, Solid, Preact, or Vue feel "refreshed". This mental burden of trying to figure out what has to be put where just...goes away. The React model tries to bend JavaScript to conform to it's render cycle rather than designing to JavaScript's unique object-functional strengths.

Thanks. A while ago I sensed the churn dangerzone around React and I refused to get on any React projects. I feel lucky that I had that option. I did some Angular projects (i think it was version 8-9) and to me it seemed okay at the time. The project evolved nicely and structurally it organized itself quite well. But there is a ton of boiler plate there as well and I’d avoid Angular in the future.

Im doing mostly back-end work these days to keep my sanity.

Re: Things I wish I knew before moving 50K lines of code to React Server Components

#416

Wow... well, I'm not here to defend RSC or React as the best solution ever, but some of the objections here are half-baked. React/RSC is not technically equivalent in benefit to having a server return html/css with a smattering of javascript. It's still one app, with more intelligent handling of the client/server boundary (compared to SSR/hydration). I'm all for reading more informed objections about how React may ha…

HN is not the best place for informed front-end opinions these days. React is not even that hard of a thing to learn (hence why even non-devs pick up the basics in a bootcamp in a few weeks?). JSX is objectively superior to the templating systems of Django, PHP, and Rails. I'm sure half the half-baked objections aren't even benchmarking their projects with things like Lighthouse...

Re: Things I wish I knew before moving 50K lines of code to React Server Components

#417
I’ve built 3D renderers with Vulkan in a day.

Have orchestrated production cloud setups for big tech companies and startups of all kinds of needs, in a week.

It’s been 3 days and I cannot get a value returned from a NextJS route to a React component.

All the blog examples look nothing like the project layout the tools generated for me.

Frontend toolkits are atrocious to work with. Reminds me of Chef/Puppet, solving hallucinated problems to soak up VC funding.

I’ll give it another day or two, because it could be me. But Apache web server, the Rube Goldberg of web software, seems as quaint to use as MS Paint relative to Reacts ecosystem.

Re: Things I wish I knew before moving 50K lines of code to React Server Components

#418
post #349

Earlier quoted context omitted.

I slapped my forehead when I was reading a thread about HTMX and someone asked. "How can you send HTML to the browser without JavaScript?"

It's not React's fault but the ignorance of the average React dev never stops surprising me. From using divs for buttons or links to this.

react-native-web

Re: Things I wish I knew before moving 50K lines of code to React Server Components

#419

Doesn’t make any sense for me why we are now using React in the backend, to render HTML… Let’s go back to 10 years ago.

Having a templating system in ‘that environment’ is worth its weight in gold IMO. I’ve been switching between Svelte and Django templates a lot lately, and Svelte just…knowing about the DOM, makes the experience so much nicer. I haven’t come across a non-JS template system that does this. And yes, I was there for PHP and jQuery and whatever.

It's just another template engine, we can do the same (components like templates) in any language for years.

Ruby example that Github is using: https://viewcomponent.org/ https://viewcomponent.org/viewcomponents-at-github.html

Post reply on HN