What Is a Client Component?
A client component is a component explicitly marked to run in the browser, where its JavaScript is downloaded and executed. It can hold local state, run effects, and attach event handlers, which server components cannot. The cost is the bundle weight and hydration its interactivity requires.
Why it matters
Client components provide the interactivity a page needs, but each one adds to the JavaScript the browser must load. Limiting them to genuinely interactive parts keeps bundles lean.
Related guides
What Is a Server Component?A server component renders only on the server, sending its result to the client without shipping its own Java…
What Is Optimistic UI?Optimistic UI updates the interface at once as if an action succeeded, before the server confirms, then recon…
What Is a Suspense Boundary?A suspense boundary wraps part of a UI so that while its data or code is loading, a fallback is shown, lettin…