"매 interactive boundary". Client Components 매 React Server Components (RSC) 매 architecture 의 매 interactive half — 'use client' directive 매 매 module-level boundary marker, 매 hydration + state + browser API 매 가능한 영역. 매 2026 현재 Next.js 13+ App Router / Remix Single Fetch / TanStack Start 의 default model.
매 핵심
매 boundary model
'use client' 매 file-top directive — 매 module 부터 dependent tree 매 client bundle 에 포함.
Server Component (default) 매 server-only render — 매 zero JS shipped.
Client Component 매 hydrate — useState / useEffect / event handler / browser API 매 가능.
매 핵심 properties
Composability: Server → Client 매 OK (props 통해), Client → Server 매 NOT (children prop slot 만 OK).
Serialization: Server → Client props 매 serializable 만 (no functions, classes, Date OK via 2026 RSC payload).
Bundle: 매 leaf client component 만 ship — 매 root 에서 'use client' 매 X.
Client Component 안 Server Component (children slot)
// Layout.tsx (Client — needs onClick)
'use client';exportfunctionSidebar({children}:{children: ReactNode}){return<asideonClick={...}>{children}</aside>;}// page.tsx (Server)
import{Sidebar}from'./Sidebar';import{ServerProfile}from'./ServerProfile';exportdefaultfunctionPage() {return(<Sidebar><ServerProfile/>{/* Server component as children — OK */}</Sidebar>);}
언제: interactivity 매 필요한 leaf component, browser-only API, 매 form / input control.
언제 X: data fetching 매 only, static content — Server Component 가 더 light.
❌ 안티패턴
Root layout 매 'use client': 매 entire app 매 client bundle — 매 RSC benefit 의 destruction.
Server-only data 매 props 로 큰 객체 pass: 매 RSC payload bloat.
Client component 안 server-only import (e.g., fs, db): 매 build error / leak risk.
Server Component 안 useState: 매 build error — 매 boundary 의 misunderstanding.