Composition over Inheritance
Understand why React favors composing components together rather than building class hierarchies to share behavior.
React's official guidance is explicit: use composition, not inheritance, to reuse code between components. Unlike some UI frameworks that encourage subclassing a base component to add or override behavior, React components share behavior by being composed together — one component rendering another, or accepting other components/elements via props (including the special children prop).
Composition is like building with modular furniture pieces you can rearrange in any room, while inheritance is like a custom-built cabinet permanently fixed to one wall — the modular pieces adapt naturally as your needs change, while the fixed cabinet requires real carpentry work to modify.