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

Counter.tsx

15 lines305 Bytes

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