Open distums opened 7 years ago
function Hoc(componentCreator) {
return function ACom (props) {
return (
<div>
{componentCreator(props)}
</div>
);
}
}
const componentCreator = (props) => <B {...props}/>
const Comp = Hoc(componentCreator);
<Comp />