Created
December 17, 2019 10:16
-
-
Save eldyvoon/2e9da1bccb9bc74ece88a32ccf1cb201 to your computer and use it in GitHub Desktop.
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 useCounter from "./useCounter"; | |
const CompOne = ({ initCounter }) => { | |
const [count, increase] = useCounter(initCounter); | |
return ( | |
<div> | |
Count: {count} | |
<button onClick={increase}>+</button> | |
</div> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment