Last active
April 25, 2021 05:29
-
-
Save myogeshchavan97/9df47569092e0579e33945419a8bc94a to your computer and use it in GitHub Desktop.
Invalid use of state
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 [count, setCount] = useState(0); | |
const handleClick = () => { | |
setCount(count + 1); | |
}; | |
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