diff options
| author | 2023-04-19 17:50:02 +0800 | |
|---|---|---|
| committer | 2023-04-19 17:50:02 +0800 | |
| commit | 56a6240bf700ac307342ed494d8bfbabe5c822dc (patch) | |
| tree | 0b1288a2ec1cbb538c11f4c122b6a97b9c55a05f /docs/components/counters.tsx | |
| parent | 3adc965dd09490b7efa1cce9f09b0a3b30970277 (diff) | |
| download | HydroRoll-56a6240bf700ac307342ed494d8bfbabe5c822dc.tar.gz HydroRoll-56a6240bf700ac307342ed494d8bfbabe5c822dc.zip | |
✨docs init
Diffstat (limited to 'docs/components/counters.tsx')
| -rw-r--r-- | docs/components/counters.tsx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/docs/components/counters.tsx b/docs/components/counters.tsx new file mode 100644 index 0000000..b78f12d --- /dev/null +++ b/docs/components/counters.tsx @@ -0,0 +1,24 @@ +// 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 /> +} |
