Live data from Hacker News

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

mux.com

521–530 of 540 posts

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

#521

Earlier quoted context omitted.

> Now if you do inherit a larger project that you don't like, well, you either work on it or you switch jobs. Which you wouldn't have to contemplate if your predescessor had simply used the right tool for the right job, right? Such as not using an over-engineered framework for a problem that didn't need to use one. :) Cheers!

I mean sure, but I wouldn't work at such places anyway. One cannot escape complexity, it's either in your code or in other people's code that you use. Don't overengineer, but not everything you'd think is overengineering is actually the case. Otherwise, just work in assembly. It is also interesting that you haven't responded to the other comments that call out flaws in your argument, just mine, perhaps because you do…

[flagged]

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

#522

Earlier quoted context omitted.

I mean sure, but I wouldn't work at such places anyway. One cannot escape complexity, it's either in your code or in other people's code that you use. Don't overengineer, but not everything you'd think is overengineering is actually the case. Otherwise, just work in assembly. It is also interesting that you haven't responded to the other comments that call out flaws in your argument, just mine, perhaps because you do…

[flagged]

I did not flag your comment, if that's what you're implying. I can't downvote comments I reply to and I'm pretty sure flagging has no effect either on such comments.

But yes, it's still interesting that you haven't responded to those other comments, as I've said.

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

#524
post #515

Earlier quoted context omitted.

As a different perspective, I'm also old enough to remember when CSS and Javascript were invented , and I've been making websites since that time. IMO web dev has never seen better tooling than today, and user experience has improved tremendously over the years. What we used to call AJAX has grown from a neat side toy to a basic part of everyday life in the form of client components and SPAs. The server is still as p…

Why would server side rendering send the entire HTML page on every time? Or lose context or page position? All those have been smoothly handled by pure server side frameworks such as wicket or tapestry for over a decade.

What do you mean? Maybe I'm misunderstanding something, but Wicket itself says it uses Ajax components for client updates.

As far as I know, it's not possible to do client-side rerendering without Javascript.

Many frameworks these days do a hybrid approach of server and client-side rendering, sometimes with rehydration, sometimes not. But my understanding is that they all require some level of Javascript to redraw UIs on the client.

If I'm misunderstanding (or just plain wrong?), could you please elaborate?

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

#525

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.

We should probably create a vault in the Artic and store bits of HTML, just in case... you never know.

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

#526

Earlier quoted context omitted.

HTMX is cool, but it's honestly only in the conversation because the developer has leveraged memes and garnered popularity on Twitter.

yeah, i'm not google of facebook or ny times or whatever, i'm a lone dev in montana what other options did i have?

I am not saying HTMX is terrible or anything. What you've built is cool and I've built something with it. The point I was making wasn't made very well. What I meant was good options are often left out of the conversation because of React, Vue and for a while there, Svelte. There are a lot of great libraries and frameworks that nobody talks about, HTMX included. I just feel like HTMX isn't being hyped because it's good, but because of the memes/marketing aspect. I think it's a disservice to your work, which deserves to be assessed on its merits. It's a sad indictment on front-end that building something good is no longer good enough to get recognition.

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

#527

Earlier quoted context omitted.

If your career can be significantly affected by devs fresh from bootcamp Well, there are certainly problems if that's the case. But it's not necessarily senior ICs that are the problem. I've experienced a few companies where "boot camp yahoos" wound up essentially running the show to ruinous effect. Why? They had numbers, essentially, and management was too hands-off to prevent it. To give a specific example: we had…

1000's of lines changed to add/remove a field from a form has nothing to do with react. That's just shit design.

Yeah. Although, that was my point?

This wasn't a rant against React. It was about the inmates (or junior devs) running the asylum.

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

#528
post #316

Earlier quoted context omitted.

Well, React certainly has succeeded in increasing the client-side complexity, that's for sure. They seem to be making good inroads on increasing server-side complexity as well. Kudos to their contributions to excess CO2 emissions! I have yet to see a React project with more than five contributors fail to turn into a big ball of mud within 18-24 months, requiring either a periodic rewrite or resigned acceptance of tru…

Well, I've yet to see any web project of that scale survive more than 2 years. What do you think would be a better stack with similar frontend interactivity? (Genuine question, not being snarky)

I have Aurelia 1 apps that have been in production since 2015. They don't need to be really touched. But, when they do, they're really easy to modify. I am currently using Aurelia 2 and will have similar scalable apps that will be in production for years to come too.

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

#529

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…

>These folks with less than 10y industry experience will run into all the basic problems we had in vanilla PHP sites years ago, I even spotted react components with inline-sql-hooks already. This time with much accidental complexity overhead! So much this. It's like our industry has a rolling 10 year cycle of amnesia. We moved away from server rendered UI for very, very good reasons. Of course the SEO argument is alw…

> We moved away from server rendered UI for very, very good reasons

Can you please list your reasons?

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

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

- npx create-next-app@latest - npx: command not found - install node / npx - npx create-next-app@latest - realise your node is too old - install nvm / node - npx create-next-app@latest - answer a bunch of questions - npm start - get an error: Error: ENOENT: no such file or directory, open '/tmp/my-app/.next/BUILD_ID' - npm run dev - hello world in browser

> - install node / npx

> - npx create-next-app@latest

> - realise your node is too old

Said no one ever. I can fully understand you not having Node installed (although having any kind of toolchain installed is a prerequisite for any programming so that's a weak argument against Node). But please don't tell me that somehow you will get an old version of Node after you just installed Node, because this is just reaching now.

> - npm start

> - get an error: Error: ENOENT: no such file or directory, open '/tmp/my-app/.next/BUILD_ID'

The README that gets generated with the project literally spells out the correct command you should use to run the project during development (which is not `npm start`), so this argument is also pretty weak.

Post reply on HN