Accepted answer

You should change React.component to React.Component capital C.
e.g-class main extends React.Component. In addition to that, remove the space between React. and Component


for me it occurred because of circular dependencies on static member (typescript). for example

B : import A from './B'

let x=A.staticValue

A : import B from './A' class A { static staticValue }


It seems that you're extending the classes wrong. It should be React.Component, not React.component

Related Query

More Query from same tag