Skip to content

Instantly share code, notes, and snippets.

@neenjaw
Created November 5, 2020 02:55
Show Gist options
  • Save neenjaw/bd46a96ff6ae03f20667213c8b908590 to your computer and use it in GitHub Desktop.
Save neenjaw/bd46a96ff6ae03f20667213c8b908590 to your computer and use it in GitHub Desktop.
Simple Button
import React, { useState } from "react";
export default function App() {
const [count, setCount] = useState(0);
return (
<div className="App">
<button onClick={() => setCount(count + 1)}>{count}</button>
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment