Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

类型不兼容 #1

Open
GreatAuk opened this issue Oct 21, 2020 · 1 comment
Open

类型不兼容 #1

GreatAuk opened this issue Oct 21, 2020 · 1 comment

Comments

@GreatAuk
Copy link

GreatAuk commented Oct 21, 2020

image

image

目前使用 connect 给组件绑定数据的页面都有这个错误,ts 初学者,搞不定这个错误😓

还有问个问题,为什么不加这个 meta tag(移动端项目一般都会加吧)
image

@ibwei
Copy link

ibwei commented Mar 31, 2021

image

image

目前使用 connect 给组件绑定数据的页面都有这个错误,ts 初学者,搞不定这个错误😓

还有问个问题,为什么不加这个 meta tag(移动端项目一般都会加吧)
image

image

你查看 ConnectState 的类型你会发现 loading 的类型时 Loading,然后 Loading 的 effects 类型是 boolean 后者 undefined,因此,你只需要讲组件的 props ->loading改为可选属性就可以了。
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants