React 19 Server Components vs Client State Management
A practical mental model for when to use Server Components, Server Actions, and client hooks.
The Shift in Mental Model
In React 18 and 19 App Router architecture, the default boundary moves to the server.
Component Rule Matrix
| Requirement | Component Type | Implementation |
| :--- | :--- | :--- |
| Database access / Secret keys | Server Component | async function Page() |
| Interactive state (useState) | Client Component | "use client" |
| Event handlers (onClick) | Client Component | "use client" |
| Server Mutations | Server Action | "use server" |
// Server Action Example
export async function likeArticle(postId: string) {
"use server";
const session = await auth();
if (!session?.user) throw new Error("Unauthorized");
return await db.like.create({
data: { postId, userId: session.user.id }
});
}
Performance Takeaways
- Zero Bundle Impact: Dependencies imported exclusively in Server Components add 0 bytes to the client JavaScript bundle.
- Streaming Suspense: Wrap heavy async database queries in
<Suspense>to send instant shell HTML to the browser.
Lead Software Architect, Writer & Thinker exploring Technology, Science, Code, Ideas, and Words.
More from CODING

The LeetCode Era Is Changing: What Happens When AI Enters the Coding Interview?
For years, aspiring software engineers have spent months solving algorithmic problems to prepare for technical interviews. Now, Google is experimenting with AI-assisted code comprehension, while HackerRank is questioning the interview culture it helped popularize. The change raises a bigger question: when AI can generate code, should hiring focus less on writing it and more on understanding, debugging, and validating it?
Your API Is Slow. Your Database Might Not Be.
A slow API does not automatically mean a slow database. Before rewriting queries or adding indexes, measure the entire request path and find exactly where the time is being spent.
HTTP Just Got a New Method: Meet QUERY
HTTP has a new method: QUERY. It is designed for complex, read-only queries that don't fit comfortably inside a URL, allowing structured query data to be sent in the request body while retaining safe and idempotent semantics.

Discussion (0)
Sign in to join the discussion, reply, and tag authors.
No comments yet. Be the first to start the discussion!