JSX element type does not have any construct or call signatures JSX element type does not have any construct or call signatures typescript typescript

JSX element type does not have any construct or call signatures


This hacky typecast makes the error go away, though I don't understand it at all:

const App: any = require('./components/views/app/app');


How about:

class App extends React.Component<any, any> {    render() {        return <div>foo</div>;    }}


React expects a React.StatelessComponent from the imported App in mainScreenHelper.tsxThis means that you need to provide that interface in App

interface IProps {}const App : React.StatelessComponent<IProps> = () => (   <div></div>);