Skip to content

Instantly share code, notes, and snippets.

@azm-gh
Created February 3, 2023 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azm-gh/96d401098dca982f8af347e6aa05107e to your computer and use it in GitHub Desktop.
Save azm-gh/96d401098dca982f8af347e6aa05107e to your computer and use it in GitHub Desktop.
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