logoalt Hacker News

nfw2today at 6:34 AM3 repliesview on HN

That doesn't seem to be how this implementation of RSC is intended to work. Here, client code triggers the RSC fetch, which is treated as any other sort of data fetch. Presumably, it still waits for client code to load to do that.

Also SSR, even in React, existed well before RSCs did, and that seems to be really what you are talking about.


Replies

tannerlinsleytoday at 7:19 AM

Correct. People need to stop conflating SSR with RSC. Well said.

h14htoday at 7:29 AM

TanStack uses streams as the basis for loading RSC data, and recommends using a route loader to access them:

https://tanstack.com/start/latest/docs/framework/react/guide...

AFAIK, at least when using TanStack Router, this RSC implementation seems just as capable as the others when it comes to reducing server round trips.

danielheptoday at 7:34 AM

SSR is different and does not provide the same performance of RSCs. With SSR you get the advantage of an initially rendered page, but you don’t have access to data or state. So you are just rendering placeholders until it hydrates and the client can request the data.

RSCs allow you to render the initial page with the content loaded right away.

That said, I am not sure about Tanstack’s implementation. Need to spend more time reading about this.

Here’s a nice post explaining why RSCs do what SSR cannot: https://www.joshwcomeau.com/react/server-components/

show 1 reply