In the App Router, pages and layouts are Server Components unless a file says otherwise. "use client" at the top of a file marks the entry of the client module graph: that file, every module it imports, and the components it renders directly are bundled for the browser. They are still rendered to HTML on the server; the directive adds client JavaScript and hydration, not client-only rendering. Server Components passed in as children or other props stay on the server; the client component receives their rendered output.
So the rule is: put "use client" on the leaf that needs interactivity (a button with state, a component using useEffect or window), and keep page.js and layout.js on the server. When an interactive wrapper must surround server UI (a modal, a collapsible, a context provider), make the wrapper a Client Component that takes children, and render it as deep in the tree as it can go.
A boundary at the top of a page costs:
- Code. Every library used only to render (parsers, formatters, syntax highlighters) is downloaded, parsed and executed in the browser.
- Hydration. React must hydrate the whole subtree, not just the button.
- Server access. The page can't import
next/headers, read secrets or query a database directly; data has to arrive as serializable props or through client fetching.
A boundary at the top is not an SEO cost: the HTML is still server-rendered. Nor is it always more bytes: rendered server output travels in the RSC payload, which can be larger than the data it came from (see Follow-ups).