DevPath · Learn to code ESPTEN

Frontend with React

🧩 Composition: children and slots

Compose interfaces by combining components: props.children for arbitrary content, slots via props, and the composition patterns React prefers over inheritance.

What you'll learn

Lessons

props.children and container componentsWrap arbitrary content. Slots: passing elements via propsThe 'holes' pattern. Composition vs inheritanceCombine components, don't extend them.
Practice this module in the app

DevPath is a hands-on course: you read the theory here; in the app you put it into practice with exercises that really run, offline.

Start free in the app →