Live data from Hacker News

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

mux.com

191–200 of 540 posts

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

#191
post #157

Earlier quoted context omitted.

classic ASP

Maintaining VBScript sucked 100x worse than TypeScript. How would you approach SSG with Classic ASP?

You’re moving the goalposts to a whole new stadium.

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

#192
post #132

Earlier quoted context omitted.

You literally just run: > npx create-next-app@latest Press Enter a few times for default settings and voila, you have a hello world app up and ready to run.

Just because it’s a one liner to install something doesn’t mean you aren’t installing a big, complex, over-engineered thing.

Look at your computer. Are all its parts and pieces strictly necessary to display the text "Hello world" on your screen? No. Why don't you throw it away and buy something simpler, then?

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

#193

I think i am getting old. These frameworks are so big and complex. For a simple web hello world you need a huge build and compile pipeline. And now its extended with serverside components. I really wonder what the overhead is. How many of layers of frontend and backend framework code is executed to get the hello world example running. I retreat back to my simple 10kb component framework in which i need only f5 to reb…

What kills me is that many websites would be better in every way if they were just html and css. I have come to think of it as premature optimization for some fancy capability down the road. It's like telling people they have to hire engineers to take core samples and do seismic modeling before building a chicken coop.

It usually takes government to tie people up in these sorts of knots. These people have enthusiastically done it to themselves. Resume driven development is a hell of a drug.

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

#194
post #131

I think i am getting old. These frameworks are so big and complex. For a simple web hello world you need a huge build and compile pipeline. And now its extended with serverside components. I really wonder what the overhead is. How many of layers of frontend and backend framework code is executed to get the hello world example running. I retreat back to my simple 10kb component framework in which i need only f5 to reb…

> For a simple web hello world you need a huge build and compile pipeline. These frameworks were not created to solve “Simple hello world” apps.

And yet they are routinely used to solve "simple hello world" apps. Riddle me that.

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

#196
post #185

Earlier quoted context omitted.

I had my own server side component system in PHP, 20 years ago. And when the marvel of AJAX happened I enabled some of the components to be requested separately by the client code, rendered and sent to the client to replace the part of the website they occupied when they were rendered when the page was served initially. Technically it wasn't client side rendering but it wasn't far from it. And for actual client side…

But you weren’t google so by definition your tech is inferior to state of the art. It was you twenty years ago reinventing the wheel we have now.

I'm sure that React is engineered way better than not only what I achieved, but also what I could ever hope to achieve. I'm not against React. I'm just saying that it's an implementation of really natural (good?) old ideas. Just in JS.

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

#197
post #34

I wonder about the code with the heading “A Server Component with data fetching”. It shows a HTTP request made to the company’s publicly visible API endpoint. But this request is being made from their own server (the one that is generating the HTML + JS from these React components). Is the idea really that your front-end generator calls client APIs rather than internal ones (e.g. just making a database request)? That…

What makes you think that server-side JS could not call a private API with authentication?

If it's a "front-end generator", we are talking about gerating static HTML, CSS, JS though. This means all "secrets" have to be embedded in client code, or the API calls have to be made at build time, with the static result embedded into the output.

So I don't see your point really.

If your point is talking to a database "directly", using only a database client and no remote intermediary, you can do this in Node as well. And presumably also in RSCs, since it's already possible in SSR.

None of this is prescribed by React.

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

#198

Earlier quoted context omitted.

Just because it’s a one liner to install something doesn’t mean you aren’t installing a big, complex, over-engineered thing.

Look at your computer. Are all its parts and pieces strictly necessary to display the text "Hello world" on your screen? No. Why don't you throw it away and buy something simpler, then?

[flagged]

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

#199
post #154

Earlier quoted context omitted.

They simplify the on-boarding of 6 months boot-camped front-end developers. They can start working and delivering right away despite not being able to tell the difference between front/back ends and having no understanding of servers.

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.

If your career can be significantly affected by devs fresh from bootcamp, you probably need to sort out your own issues than to complain here mate.

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

#200
post #131

Earlier quoted context omitted.

> For a simple web hello world you need a huge build and compile pipeline. These frameworks were not created to solve “Simple hello world” apps.

And yet they are routinely used to solve "simple hello world" apps. Riddle me that.

Some people like hitting the nail with the handle of a screwdriver instead of learning to use a hammer.

Makes you feel clever.

Idk what else to tell you.

Post reply on HN