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

KeepAlive”不能用作 JSX 组件。 其元素类型 "ReactElement<any, any> | Component<IKeepAliveProps, any, any> | null" 不是有效的 JSX 元素。 不能将类型“Component<IKeepAliveProps, any, any>”分配给类型“Element | ElementClass | null”。 不能将类型“Component<IKeepAliveProps, any, any>”分配给类型“ElementClass”。 在这些类型中,"render()" 返回的类型不兼容。 #146

Open
lishanhuan opened this issue Sep 4, 2023 · 4 comments

Comments

@lishanhuan
Copy link

No description provided.

@yang2018218
Copy link

你好 请问最后是怎么解决的, 我也出现这个问题了

@lewway
Copy link

lewway commented Aug 6, 2024

你好 请问最后是怎么解决的, 我也出现这个问题了

你的layout/index文件是不是 tsx ,改成jsx , 重新编译

@yang2018218
Copy link

yang2018218 commented Aug 6, 2024 via email

@lewway
Copy link

lewway commented Aug 6, 2024

没有问题哦,我的也是umi3.5.20, react 17.0.2

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

3 participants