Skip to content

Instantly share code, notes, and snippets.

@dance2die dance2die/App-bad.js
Last active Dec 8, 2018

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>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.