Live data from Hacker News

React Server Components made our site a lot faster

frigade.com

31–40 of 62 posts

Re: React Server Components made our site a lot faster

#31

Earlier quoted context omitted.

Because they could have moved to a server based app not using RSC and seen similar gains, so the deception is they are trying to make it seem like RSC caused the gain (and riding on the back of a hyped new technology) whereas it's not really the case.

RSC is how React figured out partial hydration. Before this, you would simply not move to a server-rendered app, as it was not worth it - the client bundle would stay the same and you're just increasing overhead.

Not true in the slightest. A server rendered app would deliver your html up front so your app is completely rendered immediately, this has been common for many years now and improves performance quite a bit. Couple with sending some static parts that avoid JS which is quite doable you have 90 some % of the benefit in a simpler model. That’s also why more direct a comparison of a SSR app to a RSC app is interesting.

Partial hydration is great but it’s a shame React is coupling it to a whole new routing model, component model, server rendering, and with such complex rules on use and inherent waterfalls as a side effect. There’s no reason to. You can get partial hydration any number of ways and avoid all the complexity.

Re: React Server Components made our site a lot faster

#32
This space is evolving so fast, and I love it!

I feel like I am in the right place at the right time to be just so happening to be working on a better and more modern Wordpress :)

If client-side/server-side rendering with static and incremental loading, combined with dynamic markdown loading is your type of thing; please checkout my project and give me a star to follow.

https://github.com/elegantframework/elegant-cli

Re: React Server Components made our site a lot faster

#33

I must be getting older, because "everything old is new again" keeps coming to mind. Only advice would be: don't follow these fads unless you a) are doing it to learn or b) can quantify tangible business value in the change. The worst reason to do it is because everyone else seems to be doing it* *Unless literally everyone is doing it and the "old" thing becomes unsupported.

[deleted]

Re: React Server Components made our site a lot faster

#34

Unbelievable, deceptive levels of clickbait at play - they moved from a client app to a server app, so of course the initial render is faster. This has nothing to do with RSC, and @dang /moderators should probably change the headline. "Moving from a client-side app to a server app (using React Server Components) made our site faster" is very unsurprising, not very interesting (what would be interesting is comparison…

[deleted]

Re: React Server Components made our site a lot faster

#35

Earlier quoted context omitted.

RSC is how React figured out partial hydration. Before this, you would simply not move to a server-rendered app, as it was not worth it - the client bundle would stay the same and you're just increasing overhead.

Not true in the slightest. A server rendered app would deliver your html up front so your app is completely rendered immediately, this has been common for many years now and improves performance quite a bit. Couple with sending some static parts that avoid JS which is quite doable you have 90 some % of the benefit in a simpler model. That’s also why more direct a comparison of a SSR app to a RSC app is interesting. P…

> Couple with sending some static parts that avoid JS which is quite doable

If when you say "they could have moved to a server based app", you are implying that they could have done partial hydration easily some other way, that's a wild assumption. Until very recently partial hydration was not even on the table, as the community decided that downloading 10MB of JS for every website was fine, and not 'quite doable' for the majority of React apps; they are usually monolithic and built on top of frameworks that make it difficult. Not impossible (we were doing this back in 2016 with different tech), but very uncommon.

As I said above, this is exactly what RSC is solving for. It's not a new thing, but the first solution endorsed by React itself, and enabled them (and potentially all React apps) to gain SSR with partial hydration, reduce bundle sizes and actually improve load performance.

I'm not a big fan of any of this, just stating what it is. And I agree that it introduces monstrous complexity to an ecosystem that's already overflowing with it. Astro for example achieves this without introducing too many new concepts.

Re: React Server Components made our site a lot faster

#36

I must be getting older, because "everything old is new again" keeps coming to mind. Only advice would be: don't follow these fads unless you a) are doing it to learn or b) can quantify tangible business value in the change. The worst reason to do it is because everyone else seems to be doing it* *Unless literally everyone is doing it and the "old" thing becomes unsupported.

Just curious, what’s the fad you’re referring to. React? Client side rendering? Single page apps?

Re: React Server Components made our site a lot faster

#37

Unbelievable, deceptive levels of clickbait at play - they moved from a client app to a server app, so of course the initial render is faster. This has nothing to do with RSC, and @dang /moderators should probably change the headline. "Moving from a client-side app to a server app (using React Server Components) made our site faster" is very unsurprising, not very interesting (what would be interesting is comparison…

I think their headline makes total sense. It's true after all, turns out putting most of the work on your server rather than your client is a great idea for performance.

You seem to be taking personal offense to using React Server Components for this, which is odd to me.

Re: React Server Components made our site a lot faster

#38
Wow there's a lot of negative comments here on such a simple post along the lines of "Hey we adopted this new version of this library and it boosted our site performance x%".

I think the move React is making to embrace the server side is a great thing. It shows we pushed really hard in one direction, made great progress in building a simple and easy-to-grok front end JS library in doing so, but in the end found that the server _is_ the correct place for the majority of the processing to happen in most cases. The great thing with React Server Components is you don't have to change much about how you write react code, you can just define which specific components you need to render on the client side and boom, huge performance jump. Why is that a bad thing?

Re: React Server Components made our site a lot faster

#39

Hey HN! I wanted to share an experiment I ran that tests the performance of RSC vs traditional client-side React on one of our product websites (productonboarding.com). I know RSC is a bit of a controversial topic since server-side rendering used to be an ancient paradigm with the shift to modern JS frameworks. As such, I went into the experiment with a healthy dose of skepticism. To test this out, I conducted an exp…

> ancient paradigm I'm assuming Gen Z? You are aware that your index.html of your React app is also server-side rendered, right? And you are aware that all the API's that your SPA talks to are also server-side rendered, right?

It’s a frequent refrain on here, whenever some post talks about doing any server rendering in a JS context, that it was done before… even well before. It’s so frequent as to be cliche, and usually rather dismissive of any actual substance to the context of whatever’s in the post.

As I read it, OP is just anticipating that reaction, acknowledging it upfront with a bit of levity.

Re: React Server Components made our site a lot faster

#40

Unbelievable, deceptive levels of clickbait at play - they moved from a client app to a server app, so of course the initial render is faster. This has nothing to do with RSC, and @dang /moderators should probably change the headline. "Moving from a client-side app to a server app (using React Server Components) made our site faster" is very unsurprising, not very interesting (what would be interesting is comparison…

This is a weird take, given that RSC is generally positioned for this kind of conversion. Among others, sure, but this is definitely one. It’s not deceptive to write about using a tool for one of its explicit intended purposes.
Post reply on HN