Hacker News new | ask | show | jobs
by _fat_santa 1163 days ago
Honestly I don't see a large use case for React Server Components, to me it's really more of a way to woo those that were still adamant about server rendering. I can see it being very useful in some specific instances, but for the most part I still advocate that one build a React site the way they always have.
1 comments

Facebook has their own internal use cases (they talked about it at some show and tell when they over-hauled the FB design a few years back).

In the rest of the world, SEO is the main use case, e.g. Company X (some kind of retailer) has invested in an SPA (when what they needed was an enriched MPA) and then found they were loosing their search engine rankings. Either they:

1. Render that in a headless browser, cache the results, and serve that to crawlers (non-optimal as detecting bots is hard); or 2. Rewrite their new website to be properly architected (at cost); or 3. Buy into server rendering to serve both normal visitors and crawlers.

I worked at a company that had _exactly_ this journey. Don't forget the non-functional requirements when designing solutions, kids.

If you buy into server rendering before you write a single line of code and understand it's a trade-off it turns out to be only mildly unpleasant in practice.

The best such codebase I can think of might still have been better off overall as an enriched MPA, but given how few normal pages it had compared to the app-ish bits - thereby making staying on a single technology stack a bigger advantage - I'm not quite willing to say it -definitely- would've been better as an enriched MPA. Not quite ;)