What Are React Server Components?
React Server Components (RSC) are components that render exclusively on the server. They never ship JavaScript to the browser, can directly access databases and file systems, and reduce the client-side bundle significantly.
Server Components vs Client Components
The key distinction: Server Components have access to server-side resources (databases, APIs, filesystem) and render once. Client Components run in the browser and can use state, effects, and event handlers.
// Server Component (default in Next.js App Router)
async function UserProfile({ id }) {
const user = await db.users.findById(id); // Direct DB access!
return <div>{user.name}</div>;
}
// Client Component
'use client';
function Counter() {
const [count, setCount] = useState(0);
return <button onClick={() => setCount(c => c + 1)}>{count}</button>;
}
When to Use Each
Default to Server Components. Add 'use client' only when you need interactivity, browser APIs, or React hooks. The smallest possible client boundary gives you the best performance.
Streaming and Suspense
Server Components work beautifully with Suspense for streaming. Slow data-fetching components can stream in progressively, keeping the page interactive from the first byte.
Common Mistakes
The biggest mistake is making entire pages client components "just to be safe." This gives up all the benefits of RSC. Think carefully about which parts need interactivity and draw the boundary there.
Alex Morgan
Senior Full-Stack Engineer
Related Articles
10 React Patterns Every Developer Should Know in 2025
These battle-tested React patterns will make your code more maintainable, reusable, and performant — from compound components to the render props pattern.
Getting Started with TypeScript in 2025: A Practical Guide
TypeScript is no longer optional for serious JavaScript projects. Here's the fastest path from zero to productive with TS in 2025.
Building Scalable APIs with NestJS: Architecture Guide
NestJS brings Angular-inspired architecture to Node.js. Learn how to structure large APIs with modules, guards, interceptors, and pipes.