This document discusses the evolution of component composition in React, from mixins to higher-order components. It describes how mixins were commonly used in early React but caused problems with name clashes and complexity. React then introduced classes but removed mixin support. Developers experimented with inheritance but it did not allow for pure composability. Later, higher-order components were introduced as a way to compose logic in a non-hierarchical manner by wrapping one component inside another. The document demonstrates how to build a controlled input component using higher-order components to separate concerns into model, view and controller logic in a modular, reusable way. It also discusses debugging techniques using the Recompact library which treats components as streams of props.
5. – from React documentation
“Sometimes very different components may
share some common functionality. These are
sometimes called cross-cutting concerns.”