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
A JavaScript library for building user interfaces with reusable components. Created by Meta, powers Facebook, Instagram, and thousands of apps.
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.
Reusable building blocks in software that handle specific functions and can be combined to build complete applications.
An open-source framework for creating videos programmatically using React code instead of traditional video editing software.
Join 0 others building with AI