What does the error “JSX element type '…' does not have any construct or call signatures” mean?

后端 未结 13 2315
余生分开走
余生分开走 2020-11-28 02:05

I wrote some code:

function renderGreeting(Elem: React.Component) {
    return Hello, !;
}
         


        
13条回答
  •  忘掉有多难
    2020-11-28 02:44

    When declaring React Class component, use React.ComponentClass instead of React.Component then it will fix the ts error.

提交回复
热议问题