{"id":145,"hash":"a2905f959ae941fd77d71ba5b2a4416782b643826f62852684b21254b9145329","pattern":"What does the error &quot;JSX element type &#39;...&#39; does not have any construct or call signatures&quot; mean?","full_message":"I wrote some code:\n\nfunction renderGreeting(Elem: React.Component<any, any>) {\n    return <span>Hello, <Elem />!</span>;\n}\n\nI'm getting an error:\n\n  JSX element type Elem does not have any construct or call signatures\n\nWhat does it mean?","ecosystem":"npm","package_name":"reactjs","package_version":null,"solution":"This is a confusion between constructors and instances.\n\nRemember that when you write a component in React:\n\nclass Greeter extends React.Component<any, any> {\n    render() {\n        return <div>Hello, {this.props.whoToGreet}</div>;\n    }\n}\n\nYou use it this way:\n\nreturn <Greeter whoToGreet='world' />;\n\nYou don't use it this way:\n\nlet Greet = new Greeter();\nreturn <Greet whoToGreet='world' />;\n\nIn the first example, we're passing around Greeter, the constructor function for our component. That's the correct usage. In the second example, we're passing around an instance of Greeter. That's incorrect, and will fail at runtime with an error like \"Object is not a function\".\n\nThe problem with this code\n\nfunction renderGreeting(Elem: React.Component<any, any>) {\n    return <span>Hello, <Elem />!</span>;\n}\n\nis that it's expecting an instance of React.Component. What you want is a function that takes a constructor for React.Component:\n\nfunction renderGreeting(Elem: new() => React.Component<any, any>) {\n    return <span>Hello, <Elem />!</span>;\n}\n\nor similarly:\n\nfunction renderGreeting(Elem: typeof React.Component) {\n    return <span>Hello, <Elem />!</span>;\n}","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/31815633/what-does-the-error-jsx-element-type-does-not-have-any-construct-or-call","votes":429,"created_at":"2026-04-19T04:41:23.147168+00:00","updated_at":"2026-04-19T04:51:11.502318+00:00"}