Broken snippet
'use client';
import { serverOnlyConfig } from "@/lib/server-config";
export default function FeedPage() {
return <button onClick={...}>Like</button>;
}Topic
Definition
A Server Component may render server-side data and compose Client Components, while browser interactivity must be isolated behind a Client Component boundary.
In simpler words
Keep the page shell on the server; make only the clicky leaf client-side.
The challenge prevents accidentally marking a whole route client-only because one child needs a button.
Definition
The "use client" directive marks a module and its imports as client-side, so it should appear only where browser APIs or interaction begin.
In simpler words
Move the interactive leaf, not the entire page, to the client.
Server Components can pass serializable props to Client Components.
A Client Component cannot import a server-only database or secret module.
Challenge lab
A feed page imports a server-only environment helper after adding "use client" for a like button.
The route was turned into a Client Component to make one button interactive.
'use client';
import { serverOnlyConfig } from "@/lib/server-config";
export default function FeedPage() {
return <button onClick={...}>Like</button>;
}Test
At least 10 questions — mix of concept, syntax, practical, and logic. Score ≥ 80% (enforced by the API) to save progress.
Checking your session…
10 questions · concept 3 · syntax 2 · practical 3 · logic 2