Skip to content

Instantly share code, notes, and snippets.

@Keldrik
Last active August 4, 2019 23:55
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 Keldrik/216aecc08244f16ff23185477ee20eff to your computer and use it in GitHub Desktop.
Save Keldrik/216aecc08244f16ff23185477ee20eff to your computer and use it in GitHub Desktop.
Fetch mit React Hooks - Beispiele
import React, { useState } from 'react';
const beispiel = () => {
const [count, setCount] = useState(0);
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