Table of Contents

React - Higher Order Component (HOC)

About

Higher Order Component is a function that takes a component and returns a new component.

It's not really a component, more a design pattern known as decorator.

For composition, see React - Composite Component (Layout) / Container Component

Syntax

const EnhancedComponent = higherOrderComponent(WrappedComponent);

Example

Management

Filter

https://github.com/facebook/react-devtools/pull/503

Documentation / Reference