Live data from Hacker News

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

mux.com

301–310 of 540 posts

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

#301
post #31

I guess you use what you are familiar with, but using react for doc site instead of using some off the shelf static site generator/cms with caching seems like wasted effort. More fun from dev point of view with react no doubt.

I hear this all the time and I don't understand it. Bootstrapping a new project with is so easy and fast, literally easier than bootstrapping a vanilla HTML project. What am I missing?

Edit: downvoters, I'm genuinely curious to hear your perspective.

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

#303
post #231
post #178

Earlier quoted context omitted.

They were created to manage complexity of building web applications. So something more like Excel than something like dummy photos gallery. One still can simply drop html file and sprinkle it with jQuery.

Ironically, “Web Excel” doesn’t use any of them. And if you asked someone who can create Excel to implement it in a webpage, they wouldn’t probably even think about these frameworks seriously. The real promise of these is web forms with a little interactivity. Anything more complex and you start to fight with it to drop back down to the level where it’s manageable.

According to LibJS Detector, Excel Online is using react.

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

#304

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…

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.

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

#305
post #55

What I love about this is how PHP and JavaScript had basically the same syntax (minus a $ symbol here or a var keyword there), and then NodeJS was like, but we want to run JS on the server! And now, 15 years later JavaScript has finally caught up and it’s basically the same as PHP, but with more acronyms and a steeper learning curve (to be fair, streaming data from server to client components using suspense is cool).…

In fairness, PHP prior to v7 was either a dumpster fire or a dirty bomb depending on how far back you go. When folks called it a fractal of bad design, it 100% deserved it, and folks rightly went looking elsewhere to solve their problems.

PHP is a phenomenally better language today, and folks really should take another look, but let's not pretend it was always anywhere near as good as it is today. Not by a long shot.

Also, don't judge NodeJS based on the React ecosystem. The sheer mass of APIs and wrappers needed to get a React-based system running is no one's fault but the React community. Stockholm Syndrome at its finest.

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

#306

Earlier quoted context omitted.

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]

> Because they are called "libraries" for a reason, it can do much more than "Hello, World", and they are routinely used for much more than that.

There you go.

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

#307

Earlier quoted context omitted.

Yeah 10 different files with 10k unorganized lines each is totally different :D I swear you js haters never fail to make me laugh with all the ignorant lamentations.

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.

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

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

Well get ready for Advanced Server Pages then! /s

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

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

Well I absolutly love rxjs, in my opinion it's one of the very few library in the JS ecosystem that are actually worth their weight

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

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

To be fair, we tend appreciate these kind of features when we are on the other side, buying, say, IKEA furniture. I respect, but don't particularly want to support professional carpenters if given the alternative. E.g. you can have cheap shit now or wildly expensive "proper" products later where the "proper" means something I do not and can not appreciate - to put it simply I know wood is made from trees and there en…

When I was younger, in a new space, my priority was FILLING IT so I could go about my life. I appreciated how easy it was to fill a space with Ikea.

Now that I'm older, in an old space, my priority is EMPTYING IT so I can go about my life. I now appreciate how permanent your space can be if you carefully deliberate each addition.

Post reply on HN