![]() |
1
Lanayaaa 2021-10-18 15:07:44 +08:00
有类似 vue 的 computed 值吗?
|
![]() |
2
yzhen123 OP @PainAndLove 没有,但是有 .useState 可以实现类似功能
|
3
cyberpoint 2021-10-18 23:51:23 +08:00
redux-toolkit 挺好用的
|
![]() |
5
yzhen123 OP |
![]() |
6
yzhen123 OP @PainAndLove 可以封装成 Store 上的方法,
```ts class Store extends NState { useCount() { return this.useState(s => s.count + 1) } } ``` |