Created
December 27, 2018 03:05
-
-
Save kasiriveni/4e00354489c1ada878737c75ad97b4ee to your computer and use it in GitHub Desktop.
This file contains hidden or 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 React, { useState } from "react"; | |
function Count() { | |
const [mycount, mysetCount] = useState(0); | |
return ( | |
<div> | |
<p>you clicked {mycount}</p> | |
<button onClick={() => mysetCount(mycount + 1)}>Click me</button> | |
</div> | |
); | |
} | |
export default Count; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment