React · Middle · Question 20 of 75

What is the compound components pattern?

Explanation

The parent holds state and passes it through Context, and the child parts use it. The user composes the markup, as with native <select> and <option>, without a dozen configuration props. Radix UI, Headless UI and Reach UI work this way.

Further reading

Problem with a question

React · Middle · question 20

Test yourself

Take the React · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz