Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

Counter.tsx

15 lines294 Bytes

1import { useState } from 'react'
2import './Counter.css'
3​
4export default function Counter() {
5 const [count, setCount] = useState(0)
6 return (
7 <button
8 className="increment"
9 onClick={() => setCount(count + 1)}
10 type="button"
11 >
12 Clicks: {count}
13 </button>
14 )