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 组件。 #298

Open
wolancy opened this issue Nov 20, 2023 · 4 comments
Open

“KeepAlive”不能用作 JSX 组件。 #298

wolancy opened this issue Nov 20, 2023 · 4 comments

Comments

@wolancy
Copy link

wolancy commented Nov 20, 2023

“KeepAlive”不能用作 JSX 组件。
其实例类型 "KeepAlive" 不是有效的 JSX 元素。
在这些类型中,"render()" 返回的类型不兼容。
不能将类型“React.ReactNode”分配给类型“import("D:/\u9879\u76EE/room-reservation-frontend/node_modules/umi/node_modules/@types/react/ts5.0/index").ReactNode”。

请问有没有知道怎么解决的?

@CJY0208
Copy link
Owner

CJY0208 commented Nov 20, 2023 via email

@Shanks0724
Copy link

react17版本还是会有这个问题呀。用的antd-pro V5 umi3的版本

@Chasen-Zhang
Copy link

“KeepAlive”不能用作 JSX 组件。 其实例类型 "KeepAlive" 不是有效的 JSX 元素。 在这些类型中,"render()" 返回的类型不兼容。 不能将类型“React.ReactNode”分配给类型“import("D:/\u9879\u76EE/room-reservation-frontend/node_modules/umi/node_modules/@types/react/ts5.0/index").ReactNode”。

请问有没有知道怎么解决的?

楼主有解决这个问题吗

@Arxun
Copy link

Arxun commented Jan 2, 2024

umi3.5 同样的问题,这不是有 ts 声明的么,难不成还要再来个@types/xxx?

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

5 participants