Live data from Hacker News

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

mux.com

321–330 of 540 posts

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

#321
post #99

Earlier quoted context omitted.

To cap it all off, I'll add some dynamism with cgi-bin magic.

I've developed a simple programming language to make this a bit easier, I've been using it for my Personal Home Page.

I wonder if you could use it to call some existing C libraries. Maybe just add some wrapper functions to execute the compiled binaries, and return the result. As long as you keep the same order of arguments for the function call, this could be quite straightforward. /s

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

#322

Earlier quoted context omitted.

My brother just started learning web development this past year and his mind was blown when I told him you could send HTml over HTtp.

Please help the guy before he gets too far along. Some of us might have to work with him. Seriously though, I saw someone described as a 22 yr old software engineer in an article. There is a better term: "Software Engineering Apprentice"

For context, he's 40 years old and working in data science after a career switch from another data-heavy field. He's just learning web dev to build internal pages for displaying stuff, so no need to worry :D

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

#323
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

npm is biggest hurdle for me to learn nodejs.

For me it has never worked in first attempt.

On other hand Ruby on Rails bundler very rarely game me errors, and for every error provided hints what to do.

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

#324
post #299
post #216

Earlier quoted context omitted.

And yet Angular is now the less complicated framework and easier to work with (IMO).

If Angular wasnt based on RXJS, I would agree with you that the defined structure of Angular makes it nice and predictable. RXJS pipe hell is a hell I wouldnt want to send my worst enemies to.

While RXJS definitely still has a role in the Angular ecosystem, a lot of what RXJS used to do is being handled by signals in the newest versions.

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

#325
post #293

I get the impression that React is trying hard to catch up with the more modern, easier, faster and cheaper alternatives. But instead of fixing the root problems (rerendering and often required memoization, leaky abstractions) and make React easier, it becomes more complex. If the end result was great, I would understand all the effort. But it isn't. React is even slower in real world than the benchmarks show. Next i…

> rerendering and often required memoization https://react.dev/blog/2023/03/22/react-labs-what-we-have-be...

So after a decade, React is finally reactive? ;-)

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

#326

Earlier quoted context omitted.

You utter these heresies whilst holding 10k files each containing 10 demonic incantations. Let us not sink into unproductive musings of the intellect, but meditate on the nature of the pendulum swing.

My ducks are in the row and there is no pendulum swing. There is one only in people's heads. People who didn't learn the tools then (when JS era started) and are refusing to learn them now (when more and more focus is on SSR). These people's opinions are irrelevant as their only argument is that they didn't invest the time to understand the benefits.

I, too, hail from those lands overrun with the elemental curly brackets. Yet my understanding has matured and is now ready to receive new wisdom and insights.

I would be careful assuming too much about us, who are wise in the ways of the world and, dare I say, exceedingly goodlooking.

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

#327

Earlier quoted context omitted.

My brother just started learning web development this past year and his mind was blown when I told him you could send HTml over HTtp.

God help us. It's not his fault, to be clear, but God help us. The problem is the dogmatism of it all. If you point to a simpler and a more obvious solution, your coworkers will ridicule you and turn you into an old man pariah.

Tell me about it. I had a lot of trouble in job interviews last year.

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

#328

Earlier quoted context omitted.

You utter these heresies whilst holding 10k files each containing 10 demonic incantations. Let us not sink into unproductive musings of the intellect, but meditate on the nature of the pendulum swing.

My ducks are in the row and there is no pendulum swing. There is one only in people's heads. People who didn't learn the tools then (when JS era started) and are refusing to learn them now (when more and more focus is on SSR). These people's opinions are irrelevant as their only argument is that they didn't invest the time to understand the benefits.

> These people's opinions are irrelevant as their only argument is that they didn't invest the time to understand the benefits.

Wouldn't the same be true of "JS era" developers who never learned the basics of a static website or a templated server-side app? If the issue is being too lazy to have more than one tool in your toolbox, then it applies to everyone.

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

#329

Earlier quoted context omitted.

My brother just started learning web development this past year and his mind was blown when I told him you could send HTml over HTtp.

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?"

Yep... yep.

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

#330

Word count: complex: 9 complicated: 2 I've tried Nextjs's app router, and server/client components, and there are more footguns and gotchas than you can shake a stick at. Maybe it'll get smoothed out over time, but right now it is downright HARD to keep the mental model of your app when server and client code is constantly being intermingled, imported, and exported back and forth to each other.

In fairness, client and server code negotiation can be an intrinsically hard problem. NextJS just tends to make matters worse more often than better.
Post reply on HN