initialState更改问题
#12011
Replies: 2 comments
-
按道理useModel只能在function组件里用,可以试试这个https://umijs.org/docs/max/valtio |
Beta Was this translation helpful? Give feedback.
0 replies
-
如同楼上所述,可以尝试使用 valtio 等可以脱离 react hook 的全局数据流方案。 |
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
-
initialState
在getInitialState
方法中被初始化后,只能在组件中使用useModel
进行更新吗?我想在
app.tsx
中layout
配置项onPageChange
更改initialState
,请问大家可以吗?Beta Was this translation helpful? Give feedback.
All reactions