Can you explain the concept of Higher-Order Components (HOC) in React?

In React, a Higher-Order Component (HOC) is a way to reuse component logic. It's a function that takes a component as an input and returns a new component with additional functionality. The returned component wraps the original component and add some extra features to it. HOCs are a pattern that allows to share common functionality between components without using inheritance or duplicating code. They are mainly used to abstract away logic that is not specific to the component, such as authentication, data loading, layout or performance optimization.