Lesson 2.2

The "use client" boundary

The directive does not mark one component as interactive — it marks the entry point to a client subtree. Everything imported below it goes to the browser too.

10mIntermediate14,470 students
Video thumbnail for The "use client" boundary

Sign in to watch this lesson

Browsing is free. Create an account to play videos and track your progress.

Overview

The directive does not mark one component as interactive — it marks the entry point to a client subtree. Everything imported below it goes to the browser too.

What this lesson covers

  • Place the directive at the boundary, not on every file
  • Push interactivity to the leaves to keep the bundle small
  • Spot the accidental import that drags the server tree client-side

This lesson sits in Server and Client Components, part of Next.js App Router in Depth. It assumes what came before it and leads directly into the next lesson in the module.

In this lesson you will:

  • Place the directive at the boundary, not on every file
  • Push interactivity to the leaves to keep the bundle small
  • Spot the accidental import that drags the server tree client-side

Pro Tip

If a whole page turned into a client component, look for one interactive import near the top of the tree.

The "use client" boundary — Skiply