mirror of
https://github.com/Sitoi/dailycheckin.git
synced 2024-11-17 21:58:03 +08:00
06cd1b0664
✨ 新增(docs-publish.yml):添加GitHub Actions工作流程,自动部署文档 🔧 更新(.gitignore):忽略.next和node_modules文件夹
25 lines
451 B
TypeScript
25 lines
451 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 />
|
|
}
|