I'm using this simple React element on the left as my root element on the page in the right.
How do I fix the error shown?
I'm using this simple React element on the left as my root element on the page in the right.
How do I fix the error shown?
This hacky typecast makes the error go away, though I don't understand it at all:
const App: any = require('./components/views/app/app');
App as an Any type and bypassing the type system. The Typescript errors went away because now you are effectively just using Javascript.How about:
class App extends React.Component<any, any> {
render() {
return <div>foo</div>;
}
}
cssModules(App, css), not the function App in the app.ts file.