Dreams Core logo

Lessons

Dashboards / Lessons

Advanced React Patterns

8 chapters · 4,820 enrolled · 4.8 rating

Your progress

14 / 34 lessons · 41%

18:24

Compound Components

Chapter 1: Getting Started · Lesson 2 of 4 · 18 min video

About this lesson

Learn how compound components let you build flexible, expressive component APIs by sharing implicit state between a parent and its children via context. We'll refactor a rigid Tabs component into a composable one and cover common pitfalls.

What you'll learn

  • Sharing state implicitly with React Context
  • Designing flexible, composable component APIs
  • Avoiding prop drilling in nested component trees
  • Common pitfalls and when compound components aren't the right fit

Instructor

Priya Nair profile photo

Priya Nair

Senior Frontend Engineer · 12 courses