Client Components
React components that run in the browser and can use hooks, event handlers, and browser APIs like localStorage.
What are Client Components?
Client Components are React components that run in the browser and can use interactive features like useState, onClick handlers, and browser APIs.
They're the default in traditional React apps, but in Next.js 13+ with the App Router, you need to explicitly mark them with 'use client' at the top of the file.
Most builders use them for anything interactive: forms, buttons, modals, client-side data fetching. They pair with Server Components, which handle the static stuff and data fetching on the server.
The 'use client' directive tells Next.js to include that component in the JavaScript bundle sent to the browser. Keep them small and use Server Components for everything else to keep your app fast.
Good to Know
How Vibe Coders Use Client Components
Frequently Asked Questions
Your Idea to AI Business In Days
Join Dan, Zehra and 0 others building AI businesses in days with video tutorials and 1 on 1 support.
Related Terms
Reusable building blocks in software that handle specific functions and can be combined to build complete applications.
A utility-first CSS framework that lets you style websites by adding pre-built classes directly to your HTML instead of writing custom CSS.
Next.js's file-system based routing that uses React Server Components for faster, more flexible page navigation and data fetching.
A React framework that handles routing, server rendering, and optimization out of the box so you can ship faster.
React components that run exclusively on the server, rendering HTML before it reaches the browser.
Join 0 others building with AI