TypeError: Class extends value undefined is not a constructor or null in react js
Should be React.Component
instead of React.component
Notice the capital letter.
when you import React then try React.Component
and never use React.Component()
. Remove these parentheses, then this error will go.
import React from 'react';
......
class App extends React.Component {
}
or you can try this.
import React, {Component} from 'react';
......
class App extends Component {