Skip to content

Instantly share code, notes, and snippets.

@dance2die
Last active Jan 5, 2022
Embed
What would you like to do?
function App() {
const [count, setCount] = useState(0);
const [message, setMessage] = useState("");
function increment() {
setCount(count + 1);
setMessage(`count is ${count}`);
}
function decrement() {
setCount(count - 1);
setMessage(`count is ${count}`);
}
return (
<div className="App">
...
</div>
);
}
@dance2die
Copy link
Author

dance2die commented Aug 21, 2020

high-five for the contribution~

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