composition

Building bigger components by combining smaller ones, often by passing elements in as children or other props.

In more detail

Composition is how React shares layout and behaviour without inheritance. Passing a component as children lets an intermediate layout skip props it does not use, which avoids prop drilling. Custom hooks compose logic in the same way components compose markup.

Related terms

Taught in

References