MENU
with a Render Prop
You can implement most higher-order components (HOC) using a regular component with a render prop:
RESETRUNFULL
function withMouse(Component) {
return class extends React.Component {
render() {
return (
<Mouse render={mouse => (
<Component {...this.props} mouse={mouse} />
)}/>
);
}
}}