Nganime-Docs/components/counters.tsx
Kiera Affarantia 33b9c31abf add library
2024-03-08 15:50:08 +07:00

24 lines
450 B
TypeScript

// Example from https://beta.reactjs.org/learn
import { useState } from 'react'
import styles from './counters.module.css'
function MyButton() {
const [count, setCount] = useState(0)
function handleClick() {
setCount(count + 1)
}
return (
<div>
<button onClick={handleClick} className={styles.counter}>
Clicked {count} times
</button>
</div>
)
}
export default function MyApp() {
return <MyButton />
}