Live data from Hacker News

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

mux.com

151–160 of 540 posts

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

#151

Web tech never ceases to amaze me in how they keep over-engineering simple things. You have a backend service, you implement it in whatever language you want, presumably C++ if you care about performance or are doing something non-trivial. It provides REST and WebSocket endpoints to input and receive data. You have your GUI to visualize the thing. Common sense is to have the overall structure in HTML and fill it in w…

[deleted]

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

#152

It's weird how projects like Turbolinks, intercooler, and pjax just don't get acknowledged in histories like this one.

Network effects, react is where the jobs are.

> Network effects, react is where the _consultancy_ jobs are.

Fixed that for you. I think this is the real reason.

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

#153
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.

Well they don't look like they were created to manage complexity either, so exactly why are they used?

I think Angular does pretty well in this

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

#154
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.

Well they don't look like they were created to manage complexity either, so exactly why are they used?

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.

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

#155

In server-side rendering, clients are sent HTML that they can see immediately I noticed this too. You can put a plaintext file on the server and it gets transferred to the browser pretty fast. You can also put another plaintext file ending with .css on the server and it can make things on the first page move and look really nice just because the browser knows what to do with it. It’s a neat trick but still second to…

I thought we had lost that technology.

[flagged]

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

#156

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…

I didn't like the idea of moving to frameworks but it does make things simple again. It is probably slightly simpler than the stuff before SPA (Django, RoR).

There is overhead with working out where something, should be rendered but, in my experience, a lot of the issues are raised at compile-time and are quite transparent (the articles overstates the issues you have here, there is mental overhead but it isn't bad). The SPA period of React was awful for complexity (this was also when React had lifecycle methods, wasn't well-integrated into webpack...awful).

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

#157
post #95

Earlier quoted context omitted.

> plenty of maps, filters, recursion and indexing into the data Are there a lot of server side template languages that can’t do this? This is straight-forward stuff.

> Are there a lot of server side template languages that can’t do this? Did I say there weren't a lot of template languages that can do this? A dead give-away that this subject isn't as "straight-forward" as you think is that, at one sentence in, you've already misidentified the conversation taking place. This isn't about can vs can't, but about the right tool for the job. What template language would you personally…

classic ASP

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

#159
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.

Well they don't look like they were created to manage complexity either, so exactly why are they used?

To give some abstractions out of the box, mostly, so you don’t have to reinvent the wheel - the demands of a lot of websites and applications nowadays include interactivity on every level, very fast and smooth ui population, and pretty animations. Sometimes the tools are great for working in huge teams on the same codebase, sometimes it’s for giving a lot of features to a smaller team.

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

#160

"This was called client-side rendering (CSR) or single-page applications (SPA) and was widely considered a bad move." Why was it considered a bad move to go SPA? I generally disagree with this statement. But I feel like whenever this conversation comes up we're talking different applications altogether. A SPA is fine for a back office application. What it's not necessarily good for is a splash page or marketing page…

SPA required building out a separate back-end API, it had poor load times because everything had to be loaded at once (then you had all the complexity to find solutions within that paradigm with code-splitting), there was always this gap with the HTML part of the site, you had all the complexity with bundling, lots of reasons.

Trello is probably an example of an app that worked with SPA. But the other perspective of this is that people weren't sensible about using React, they tried to use it for everything, they got onto React because they could hire for a very discrete front-end role and then split back-end, very few companies did this sensibly. The big problem with React was really how people used it, and this seems to have guided the development efforts on the project.

Btw, the move to SSR is already having operational issues. I have noticed companies hiring now for "full-stack React" because they hired a lot of front-end specialists who don't know anything about Node and won't learn it...so I think the issues with hiring will continue.

Post reply on HN