Created
February 3, 2023 13:02
-
-
Save azm-gh/96d401098dca982f8af347e6aa05107e 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
export default function Counter() { | |
const [count, setCount] = useState(0); | |
function handleClick() { | |
setCount(count +1); | |
} | |
return ( | |
<button onClick = {handleClick}> | |
You pressed me {count} times | |
</button> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment