umi项目中setState后在Model里拿到的数据依旧是原来的数据? #12432
Unanswered
BoyXuanzai
asked this question in
Q&A
Replies: 1 comment
-
是没有订阅更新吗,或者只是更改的引用,没有更改整个值。 如还有问题,需要给一个最小复现。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
在umi4项目中,数据和方法存放到Model里面,每个组件使用useModel的Hooks拿到对应model里的数据,每次setState之后再调用model里面的方法时,该方法接收到的参数的值依旧是setState之前的值,怎么解决??
Beta Was this translation helpful? Give feedback.
All reactions