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

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

I wrote some code:

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


        
13条回答
  •  一生所求
    2020-11-28 02:33

    In my case, I was using React.ReactNode as a type for a functional component instead of React.FC type.

    In this component to be exact:

    export const PropertiesList: React.FC = (props: any) => {
      const list:string[] = [
        ' Consequat Phasellus sollicitudin.',
        ' Consequat Phasellus sollicitudin.',
        '...'
      ]
    
      return (
        }
          dataSource={list}
            renderItem={(listItem, index) =>
               {listItem } 
          }
        />
      )
    }

提交回复
热议问题