Live data from Hacker News

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

mux.com

1–10 of 540 posts

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

#4
post #2

https://docs.mux.com/ doesnt seem very interactive at all. i guess i'm being that guy but i'm wondering why it had to be in React, much less RSCs.

It seems most of the content is dynamically rendered (at build time with SSG). What alternative did you have in mind?

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

#6
Maybe it's just the circles in which I've been active lately, but I feel like a lot of time and effort is spent these days practically just moving code around between implementations, without much practical change in user experience.

What drives this behaviour? I mean the question on a deeper level. An answer like "the technology hype cycle" just begs the question. Why does someone feel like they have to move business logic onto a particular framework (and then realise it's a mistake and move it again to a different framework that's similar to the one they started on?)

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

#7
Not sure if the OP is here but on Firefox clicking the "API reference" button on the top left causes the full page transition to stutter. The profiler says more than 150ms is spent in a getBoundingClientRect call in a componentDidMount triggering reflow + style computation and 30ms on set Element.innerHTML. That seems excessive especially since I'm looking at this on a recent M1 Macbook.

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

#8
post #6

Maybe it's just the circles in which I've been active lately, but I feel like a lot of time and effort is spent these days practically just moving code around between implementations, without much practical change in user experience. What drives this behaviour? I mean the question on a deeper level. An answer like "the technology hype cycle" just begs the question. Why does someone feel like they have to move busines…

I think it's somewhat similar to the "not invented here" syndrome, but more of a "not invented now" syndrome.

People (rightly or wrongly) believe the new technology is better suited to their problems.

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

#9
"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 where each page truly operates independently. But in the case of an app that people use frequently, the client side code all gets cached locally anyways, and SSR doesn't buy you anything for that use case. SSR is great for getting a fast time to render on the very first hit to a page. But if you're making a real, rich app, that people will use daily client side JS is not bad at all.

I worked on Trello for a while, it was a single page app with a Node.js API. We served millions of users with it, and people generally loved the UX of our app. But it was a true web app, and not a website. Interactivity was always part of the user experience, and many of the behaviors would be impossible in a pure SSR app.

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

#10
post #2

https://docs.mux.com/ doesnt seem very interactive at all. i guess i'm being that guy but i'm wondering why it had to be in React, much less RSCs.

It seems most of the content is dynamically rendered (at build time with SSG). What alternative did you have in mind?

I'd rather use Blazor, or Jinja. But I hate react, js, and front end work, so maybe I'm not the target audience.

I clicked the link out of morbid horror.

Post reply on HN