Back to Developer Roadmap

High Order Components

src/data/roadmaps/react/content/[email protected]

4.01.1 KB
Original Source

High Order Components

A higher-order component (HOC) is an advanced technique in React for reusing component logic. HOCs are not part of the React API, per se. They are a pattern that emerges from React’s compositional nature.

Concretely, a higher-order component is a function that takes a component and returns a new component.

Higher-order components are not commonly used in modern React code. In order to reuse logic, React hooks are mainly used now.

Visit the following resources to learn more: