React Server Components (RSC) let you render components exclusively on the server. Unlike traditional SSR, they don't send any JavaScript to the client.
Use Server Components for anything that reads data — layouts, pages, data-fetching wrappers. Switch to "use client" only when you need interactivity, state, or browser APIs.
const Page = async () => {
const data = await db.query.posts.findMany()
return <PostList posts={data} />
}
This runs entirely on the server. No useEffect, no loading spinners, no client bundle overhead.
Great writeup. The part about zero client-side JS was the thing that finally made RSC click for me.
Wish I had this when I first started with the App Router. Bookmarking.
The code example at the end is exactly what I needed to see.
Log in to leave a comment.