I think it means that any page that only renders server components can just push the built html to the browser. If there were to be client components, like an upvote button, react would be required for that to hydrate the DOM.
It’s very similar to what Astro is doing. Only adding the JS if it’s actually necessary.
Re:Next.js 12
by robertrbairdii on Tuesday October 26, 2021 @02:22PM
(#29004179)
From my understanding from watching the keynote earlier today, the reason that demo has JS is that repo opted in to have client side code to handle the upvote functionality. If it didn't require that interactivity it could be shipped with no client side JS. The client side js code is defined in the component files ending in .client.js
https://github.com/vercel/next-rsc-demo/tree/main/components
You can read more here on the original RSC announcement: https://reactjs.org/blog/2020/12/21/data-fetching-with-react.... RSC are still experimental, and as mentioned, this demo has some client-side functionality (upvotes).
Thank you for your response! However, the linked content further seems to support my suspicion that having websites without any client-side JS is not in the scope of RSCs. The linked RFC, in my opinion, clearly states for it to be expected that a client-side framework and React accept and handle the streamed React response[1]. So while it may be possible to eliminate a lot of client-side JS, at least those would always have to be available on the client, correct?
I would also like to make it understood that I'm not here to bash the Next project, I am simply interested in the technology.
[1]: https://github.com/josephsavona/rfcs/blob/server-components/...
Seems he missed your question, which I’m also curious about.
I would assume "no client side js" means "works fine in w3m". I'm guessing that's not the case?
[1]: https://nextjs.org/docs/advanced-features/react-18#react-ser...