MCPcopy
hub / github.com/antfu/vitesse-nuxt / useCount

Function useCount

app/composables/count.ts:1–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1export function useCount() {
2 const count = useState('count', () => Math.round(Math.random() * 20))
3
4 function inc() {
5 count.value += 1
6 }
7 function dec() {
8 count.value -= 1
9 }
10
11 return {
12 count,
13 inc,
14 dec,
15 }
16}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected