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.

Duration
11m
Level
Intermediate
Students
14k students

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.

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

Resources

Next.js documentation

The official reference for the tools used in this lesson.