Created
November 30, 2019 20:27
-
-
Save 01Clarian/63d958c368b2dfbb83336cda07489fda to your computer and use it in GitHub Desktop.
ClickCounter refactored for 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 ClickCounter = (props) => { | |
return ( | |
<button onClick={props.increment}> | |
{props.count}</button> | |
); | |
} | |
export default EnhanceComponent(ClickCounter); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment