Henil ShahAvailable for work
React & Next.jsMar 30, 2026

SERVER COMPONENTS VS CLIENT COMPONENTS IN NEXT.JS

Mastering the architectural boundary between React Server Components and 'use client' directives to eliminate JavaScript bundle bloat.

SERVER COMPONENTS VS CLIENT COMPONENTS IN NEXT.JS

ZERO-BUNDLE-SIZE ARCHITECTURE ON THE SERVER :

By default in the Next.js App Router, every page and component is a React Server Component (RSC). RSCs execute exclusively on the server, can directly query databases and internal microservices, and send clean rendered HTML and an RSC wire format to the browser.

Their greatest advantage is Zero Bundle Size: heavy Markdown parsers, date formatting libraries, and database ORMs imported inside a Server Component add exactly 0 bytes to the client JavaScript bundle.

ZERO-BUNDLE-SIZE ARCHITECTURE ON THE SERVER :
Henil Shah
Available for work

INTERACTIVITY, HOOKS, AND CLIENT COMPONENT BOUNDARIES :

Whenever a component requires client-side interactivity—such as useState, useEffect, onClick handlers, browser APIs, or custom hooks—you declare the 'use client' directive at the very top of the file.

Marking a component with 'use client' creates a boundary: that component and all its imported children will be packaged into the client JavaScript bundle and hydrated in the user's browser.

INTERACTIVITY, HOOKS, AND CLIENT COMPONENT BOUNDARIES :

COMPOSITION PATTERNS FOR OPTIMAL PERFORMANCE :

A common anti-pattern is placing 'use client' at the top of an entire page layout. This forces the entire subtree to be bundled for the client, defeating the purpose of Server Components.

Instead, push 'use client' down to the smallest leaf components (like an interactive ToggleSwitch or SearchBar), passing Server Components as children to retain zero-bundle-size benefits across static page elements.

COMPOSITION PATTERNS FOR OPTIMAL PERFORMANCE : - Part 1
COMPOSITION PATTERNS FOR OPTIMAL PERFORMANCE : - Part 2
Henil Shah
Available for work

DISCOVER MORE

Henil Shah
Hi

LET'S WORK TOGETHER

Let's build something impactful together — whether it's your brand, your website, or your next big idea.