-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBasic.jsx
36 lines (26 loc) · 959 Bytes
/
Basic.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { useEffect, useState } from "react"
import Button from "../components/Button";
const Basic = () => {
const [count, setCount] = useState(100);
useEffect(() => {
console.log(count);
return () =>{
console.log('Testing buddy');
}
}, [count])
return (
<main className="w-screen h-screen flex flex-col justify-center gap-10 items-center bg-black overflow-hidden">
<div className="flex flex-col justify-center gap-5">
<button
className="text-black text-lg bg-white rounded-xl"
onClick={() => setCount(count - 10)}>-</button>
<h1 className="text-white text-4xl text-bold">Count: {count}</h1>
<button
className="text-black text-lg bg-white rounded-xl"
onClick={() => setCount(count + 10)}>+</button>
</div>
<Button className="w-20 h-20 text-white bg-black flex item-center" next="/dot"/>
</main>
)
}
export default Basic