Server Components Basics in React

From the React Design Patterns cheat sheet ยท Server Components ยท verified Jul 2026

Server Components Basics

Async components that run on the server with direct data access

jsx
// app/posts/page.tsx - Server Component (default)
async function PostsPage() {
  const posts = await db.post.findMany();

  return (
    <ul>
      {posts.map(p => <li key={p.id}>{p.title}</li>)}
    </ul>
  );
}
๐Ÿ’ก Server Components are async, run only on the server, and never ship JS to the browser
โšก Pass Server Components as children to Client Components - best of both worlds
๐Ÿ“Œ Props from Server โ†’ Client must be serializable: no functions, classes, or Dates
๐ŸŸข Default to Server Components and opt into Client Components only when you need interactivity
rscserver-componentsreact-19

More React tasks

Back to the full React Design Patterns cheat sheet