summaryrefslogtreecommitdiff
path: root/react/03-clean/src/App.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'react/03-clean/src/App.jsx')
-rw-r--r--react/03-clean/src/App.jsx20
1 files changed, 20 insertions, 0 deletions
diff --git a/react/03-clean/src/App.jsx b/react/03-clean/src/App.jsx
new file mode 100644
index 0000000..a96df94
--- /dev/null
+++ b/react/03-clean/src/App.jsx
@@ -0,0 +1,20 @@
+import { useState } from 'react'
+
+function App() {
+ const [count, setCount] = useState(0)
+
+ return (
+ <>
+ <button
+ type="button"
+ className="counter"
+ onClick={() => setCount((count) => count + 1)}
+ >
+ Count is {count}
+ </button>
+
+ </>
+ )
+}
+
+export default App