initialState中的InitialStateType无法推导TS #12459
Unanswered
blackcorgi
asked this question in
Q&A
Replies: 1 comment 2 replies
-
一个新生成的 umi 4 max 项目里,有一段代码: // app.ts
export async function getInitialState(): Promise<{ name: string }> {
return { name: '@umijs/max' };
} 然后在其他地方使用 如果还有问题,需要给一个有类型问题的最小复现仓库。 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
getInitialState中通过类型声明也无法在useModel使用时生效。
Beta Was this translation helpful? Give feedback.
All reactions