#Server Component vs SSR
27 messages · Page 1 of 1 (latest)
🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord
🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize
✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)
Bro SSR involves rendering the complete page on the server and dynamic content can be rendered per request. And server components are static components that render on the server and ideal for static content that doesn't need client-side interactivity.
Hope so you understand. Still if you have any question you can ask.
damn! man! you made it clear simply
My Pleasure
So this means Server component can be used for SSR and SSG?
to achieve SSR or SSG, RSC is necessary
is it correct?
this is true
ohh thanks 🙂
No, React Server Components (RSC) are not necessary to achieve Server-Side Rendering (SSR) or Static Site Generation (SSG). While RSC can enhance these techniques, they are not a prerequisite.
so SSR and SSG are goals
and RSC is a tool for those goals
now i am confused
if you don't use RSC, how do you render react component on server
Bro without RSC, you can use next js, which render the entire page on the server for each request.
but by default, every components are RSC
no?
that's why I: don't need to write 'use server' ?
yes
then you use always RSC for server rendering
yes
bro there is a difference RSC and SSR.
what's that my bro
Bro first RSC and completly static means no interativity and SSR renders the initial HTML on the server and sends it to the client. This helps with faster initial load times and better SEO. After the HTML is sent to the client, the React JavaScript bundle is also sent, and React takes over to make the page interactive. This process is known as hydration
Did you ever used next js