Skip to content

Instantly share code, notes, and snippets.

@krishnadevz
Last active March 17, 2020 05:22
Show Gist options
  • Save krishnadevz/ac301ae23a7060800e87ab95159454cd to your computer and use it in GitHub Desktop.
Save krishnadevz/ac301ae23a7060800e87ab95159454cd to your computer and use it in GitHub Desktop.
useState hook in functional component
import react,{useStae} from "react"
function App(){
const [answer]=useState("yes lovely")
return(
<div>
<h1>Are you coming{answer}</h1>
</div>
)
}
export default App
//if anyone having something please drop comment we add or merge your thing thasall
@krishnadevz
Copy link
Author

useState hook in functional component

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment