Issue 04 · August 2026
Ship less JavaScript by moving one line
Where you put use client matters more than you think.
From Mushfiq Alam Sami <mushfiq9912@gmail.com>
Hey, quick one with a big payoff.
Most slow pages are not slow because of clever code. They are slow because a lot of ordinary code was sent to the browser that never needed to go.
Tip of the issue
Push use client down to the leaves
In the App Router, components are server components unless you say otherwise. Marking a whole page as a client component sends everything under it to the browser, including text that never changes.
Keep the page on the server and put the directive on the smallest piece that needs state, such as the button, not the card that holds it.
// LikeButton.tsx (the only client file)
"use client"
import { useState } from "react"
export default function LikeButton() {
const [liked, setLiked] = useState(false)
return (
<button onClick={() => setLiked(!liked)}>
{liked ? "Liked" : "Like"}
</button>
)
}A server component can import a client component freely. It only goes the other way with restrictions.
Small challenge
Find the leaf
Open a client component of yours that is longer than 100 lines. Find the one or two parts that actually use state or browser APIs and split them out. Then compare the production build output before and after.
Hint: bun run build prints the size of every route.
Worth your time
- React Server Components
The official explanation of what runs where, and why.
- Next.js documentation
The rendering section is the one to bookmark.
Project idea
A bundle diary
Record the size of each route after every deploy in a small file, and chart it over time. You will learn exactly which pull request made the site heavier.