相关疑难解决方法(0)

错误"JSX元素类型'''没有任何构造或调用签名"是什么意思?

我写了一些代码:

function renderGreeting(Elem: React.Component<any, any>) {
    return <span>Hello, <Elem />!</span>;
}
Run Code Online (Sandbox Code Playgroud)

我收到一个错误:

JSX元素类型Elem没有任何构造或调用签名

这是什么意思?

typescript reactjs material-ui

124
推荐指数
12
解决办法
7万
查看次数

标签 统计

material-ui ×1

reactjs ×1

typescript ×1