What is Higher Order Components
A higher-order component in React is a pattern used to add common functionality between components without repeating code. A higher-order component is actually not a component, it is a function. In Hoc function takes a component and returns new component. It modifies the component into another component and adds additional data or functionality.
- Easy to handle
- code Readability
- Code reuse, logic and bootstrap abstraction
- Render Highjacking
- State abstraction and manipulation
- Props manipulation
conclusion The primary use of Higher-order Component is to reuse the same component in different components. we can also use to solve the DRY problem. The return component will render the original component.