Reactjs : High-order component example
It's takes a component and returns a new component.
A good use case for an HOC is authorization. You could write your authentication code in every single component that needs it.
Simple Without HOC
A good use case for an HOC is authorization. You could write your authentication code in every single component that needs it.
Simple Without HOC