Created
November 30, 2019 20:35
-
-
Save 01Clarian/267da1c372b1e2153212e8b53e139f39 to your computer and use it in GitHub Desktop.
HoverCounter Component Refactored HOC Pattern
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import EnhanceComponent from './EnhanceComponent' | |
const HoverCounter = (props) => { | |
return ( | |
<h2 onMouseOver={props.increment}> | |
{props.count}</h2> | |
); | |
} | |
export default EnhanceComponent(HoverCounter); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment