React Server Components broke my brain in the same way TypeScript's generics did the first time: not because the concept is hard, but because my default assumption — "all components are the same kind of thing" — was wrong. These are the errors I made, in order of cost.
I treated server components like SSR-lite: "render on the server for speed." That framing makes every decision confusing, because RSC is not a rendering optimization — it's a component model:
Server Component: runs on the server, can touch data directly,
ships ZERO JS to the client.
Client Component: runs in the browser, can use state/effects,
ships its JS bundle to the client.
The question is no longer "where do I render?" It's "does this component need to run in the browser at all?"
Error 2: Client Components Fetching Their Own Data
My first RSC app looked like this:
'use client';
export default function ArticlePage({ id }: { id: string }) {
const [article, setArticle] = useState(null);
useEffect(() => {
fetch(`/api/articles/${id}`).then(r => r.json()).then(setArticle);
}, [id]);
}
This is the pre-RSC pattern, carried forward out of habit. The RSC version:
export default async function ArticlePage({ id }: { id: string }) {
const article = await db.getArticle(id);
return <ArticleClient article={article} />;
}
'use client';
function ArticleClient({ article }: { article: Article }) {
}
[!NOTE]
- The rule: server components fetch; client components interact. If you catch yourself writing
useEffect + fetch inside a client component for initial data, stop — that data belongs one level up.
Error 3: Forgetting the Boundary Is One-Way
Data can flow server → client (as props). Code with side effects can only live on the client. The moment I tried to pass a function or a database handle down, I got errors like:
Functions cannot be passed directly to Client Components unless you
start using experimental Server Actions.
The mental model that fixed it: think of props crossing the boundary as a serialization checkpoint. Anything that can't be serialized (functions, class instances, handles) cannot cross.
Error 4: Sprinkling 'use client' Everywhere
My instinct was to mark everything 'use client' "to be safe." That quietly disables RSC's entire value — you end up with a fat client bundle and server fetches anyway. The discipline:
1. Start with NO directive (server component).
2. Add 'use client' only when the component needs:
- state / effects
- browser APIs (localStorage, window, canvas)
- event handlers that need interactivity
3. Lift the 'use client' boundary as LOW as possible.
The lower the boundary (closer to the leaf), the more of the tree stays server-side.
Error 5: Treating Suspense as a Loading Spinner
<Suspense> in RSC is a streaming boundary, not a spinner. The server sends the page in chunks; a Suspense boundary lets fast content paint while slow data resolves:
<div>
<Header /> {}
<Suspense fallback={<ArticleSkeleton />}>
<ArticleBody /> {}
</Suspense>
<Suspense fallback={<CommentsSkeleton />}>
<Comments /> {/* independent — slow comments don't block article */}
</Suspense>
</div>
The lesson: independent slow things need independent boundaries, or they hold up the whole page.
The Rules I Write Down Now
1. Default = server component. 'use client' is a deliberate choice.
2. Server fetches. Client interacts.
3. Props crossing the boundary must be serializable.
4. One boundary per independent slow thing.
5. If the component could exist as a static file, it probably should.
RSC didn't make React harder. It made my assumptions visible. Once "components are two kinds of things" clicked, everything else — data flow, streaming, bundle size — followed naturally.
Discussion (0)
Sign in or create an account to join the discussion.
No comments yet. Start the discussion.