Introduction

Let’s have a look at Higher Order Components and see how they enable component-based development by dividing components into business and display logic.

What are higher order components?

Higher order components (or HOC or HOCs for short) were, and still are, a central concept in React. They allow you to implement components with reusable logic and are loosely tied to higher order functions from functional programming. These kinds of functions take a function as a parameter and return another function. In terms of React, this principle is applied to components. HOCs derive their name from those higher order functions.

Let us look ...