HOCs are functions that take a component and return a new component, used to add additional functionality to existing components without modifying them directly.
function withLogger(Component) {
return function(props) {
console.log("Component is rendered");
return <Component {...props} />;
};
}