Last active
June 26, 2020 15:18
-
-
Save amcginlay/439921c5beb80c156fe19a7b1726dfb2 to your computer and use it in GitHub Desktop.
Put this into https://jscomplete.com/playground
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
function Button() { | |
const [counter, setCounter] = useState(0); | |
return <button onClick={() => setCounter(counter+1)}>{counter}</button>; | |
} | |
ReactDOM.render( | |
<Button />, | |
document.getElementById('mountNode'), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment