Last active
April 25, 2021 05:42
-
-
Save myogeshchavan97/a8504e5c9582443db0dcc46831f15bba to your computer and use it in GitHub Desktop.
Updated Counter
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
const App = () => { | |
const inputRef = useRef(0); | |
const handleClick = () => { | |
inputRef.current++; | |
console.log("count", inputRef.current); | |
}; | |
return ( | |
<div> | |
<Header /> | |
<input type="button" onClick={handleClick} value="Increment" /> | |
<Content /> | |
</div> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment