UNPKG
@twotwoba/vv-cli
Version:
latest (2.9.4)
2.9.4
2.9.3
2.9.2
2.9.0
2.8.6
2.8.5
2.8.3
2.8.2
2.8.1
2.8.0
2.7.0
2.6.3
2.6.2
2.6.1
2.6.0
2.5.1
2.4.6
2.4.5
2.4.4
2.4.3
2.2.7
2.2.6
2.2.5
2.2.4
2.2.3
2.2.2
2.2.1
2.1.10
2.1.9
2.1.8
2.1.7
2.1.5
2.1.4
2.1.3
2.1.2
2.1.1
2.1.0
2.0.0
1.1.7
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.8
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
CLI tool for creating Vue3 or React19 template projects by vite
@twotwoba/vv-cli
/
template-react
/
src
/
store
/
useCount.ts
15 lines
(11 loc)
•
263 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import
{ create }
from
'zustand'
type
state = {
count
:
number
}
type
action = {
increment
:
() =>
void
}
export
const
useCountStore = create<state & action>(
(
set
) =>
({
count
:
0
,
increment
:
() =>
set
(
(
state
) =>
({
count
: state.
count
+
1
})) }))