React Server Components (RSC) are one of the most important features in Next.js 15. They allow you to render components exclusively on the server — without sending JavaScript to the client.
// app/blog/page.tsx — Server Component (default)
import { prisma } from "@/lib/prisma"
export default async function BlogPage() {
const posts = await prisma.blogPost.findMany({
where: { status: "PUBLISHED" },
orderBy: { publishedAt: "desc" },
})
return (
<div>
{posts.map((post) => (
<article key={post.id}>
<h2>{post.titleEn}</h2>
<p>{post.descriptionEn}</p>
</article>
))}
</div>
)
}
Note: Server Components are the default in Next.js 15. You only need to add
"use client"when you need browser APIs, state, or event handlers.
| Feature | Server Component | Client Component |
|---|---|---|
| Database access | ✅ | ❌ |
useState / useEffect | ❌ | ✅ |
Event handlers (onClick) | ❌ | ✅ |
| Browser APIs | ❌ | ✅ |
| SEO-critical content | ✅ | ⚠️ |
"use client" directives in layoutsServer Components fundamentally change how we build React applications. The key is to draw the boundary between server and client intentionally.