Bits Kingdom logo with a hexagon lattice, uppercase text in white, and a minimalistic design.

How to Use React Server Components (Without Shipping Extra JS)

Chapter 3: Build faster, leaner web apps without client-side bloat.

by Jun 5, 2025Development

Home / Development / How to Use React Server Components (Without Shipping Extra JS)

Think back to the last time you built a React page and thought, “Do I really need all this JavaScript just to show a product name?”
Now imagine if you could render that same page — server-side, fast as lightning, with zero client-side code — and still use components like you’re used to.

That’s what React Server Components bring to the table. No hydration hacks. No overthinking data fetching. Just fast, clean rendering directly from your server.

And the best part? If you’re using the app/ directory in Next.js 14, you’re already halfway there.

Let’s break it down.

Next.js logo on black background, introducing a series of practical articles to make the most of the framework.

What Are React Server Components?

React Server Components let you render parts of your UI directly on the server, and skip sending JavaScript for those parts to the browser. That means:

  • Faster initial page loads
  • Minimal JavaScript bundles
  • No hydration delays

Unlike traditional SSR or static generation, RSCs are streamed from the server and don’t require rehydration or even client-side JS.

Where Do They Live in Next.js?

React Server Components are the default behavior in the app/ directory, which is now the standard in Next.js.

// app/products/page.tsx
export default async function ProductsPage() {
  const products = await fetchProducts(); // Runs on server
  return <ProductList products={products} />;
}

No getServerSideProps. No useEffect. No boilerplate. Just async/await and JSX.

When Do You Use "use client"?

You only need to opt into a client component when:

  • You use state (useState, useReducer)
  • You need browser APIs or lifecycle methods
  • You’re handling events (like clicks or form submissions)
// app/components/Counter.tsx
'use client';

import { useState } from 'react';

export default function Counter() {
  const [count, setCount] = useState(0);
  return <button onClick={() => setCount(count + 1)}>{count}</button>;
}

Best practice: Keep client components focused and small.

Server vs Client: What It Looks Like

// Server Component (default)
export default async function ProductList() {
  const products = await db.getAll();
  return <ul>{products.map(p => <li key={p.id}>{p.name}</li>)}</ul>;
}
// Client Component (explicit)
'use client';
export default function ClickTracker() {
  useEffect(() => trackClicks(), []);
  return <button>Track</button>;
}

No confusion. No abstraction soup. Clear separation of concerns.

Why Should You Use RSCs?

AdvantageDescription
Smaller JavaScriptSend less to the browser
Simpler Mental ModelNo getServerSideProps, just async in component
Faster Time-to-First-ByteStreamed from server, ready to paint sooner
Layout-FriendlyIntegrates smoothly with nested layouts

Common Gotchas

  • Server components can’t use useState or other client-only hooks
  • Don’t try to access browser-specific data (like localStorage or cookies)
  • Compose interactivity by combining with client components

Production-Ready Today

React Server Components are stable in Next.js 15. You can use them now in any project using the App Router.

Final Thought

Less JavaScript. Less complexity. More performance and clarity. That’s the promise of React Server Components — a rethink of how we build modern web apps. If you’ve ever wanted your React code to do less in the browser and more on the server, this is your moment.

Next up: When to Use SSR, SSG, or ISR in Next.js

Not sure when to render on the server, when to prebuild, or when to go hybrid? In the next chapter, we’ll break it all down, with practical advice on choosing between SSR, SSG, and ISR, and how to mix them for real-world performance. See you there.

Explore more topics: