Created
August 4, 2019 23:58
-
-
Save Keldrik/e91b7a73ac2f89d02acca149032aadb0 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
import React, { useState, useEffect } from 'react'; | |
const beispiel = () => { | |
const [count, setCount] = useState(0); | |
useEffect(() => { | |
document.title = `Du hast ${count} mal geklickt!`; | |
}); | |
return ( | |
<div> | |
<p>Du hast {count} mal geklickt!</p> | |
<button onClick={() => setCount(count + 1)}> | |
Klick mich! | |
</button> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment