Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
function App() {
const [count, setCount] = useState(0);
const [message, setMessage] = useState("");
function increment() {
setCount(count + 1);
function decrement() {
setCount(count - 1);
useEffect(() => setMessage(`count is ${count}`), [count, message]);
return (
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.