Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Need to Tackle with this Issue of TypeError: Cannot set property 'props' of undefined

I am New in coding and unable to find out why this error. below code and error SS

import React,{Component} from 'react';

import './App.css';
import Home from './Component/Home.js'

class App extends Component() {

  render(){
    return (
      <Home/>
    );
  }

}

export default App;

error TypeError: Cannot set property 'props' of undefined Component E:/ReactProjects/chatapp/node_modules/react/cjs/react.development.js:428 425 | 426 | 427 | function Component(props, context, updater) {

428 | this.props = props; 429 | this.context = context; // If a component has string refs, we will assign a different object later. 430 | 431 | this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the View compiled Module../src/App.js E:/ReactProjects/chatapp/src/App.js:6 3 | import './App.css'; 4 | import Home from './Component/Home.js' 5 | 6 | class App extends Component() { 7 |
8 | render(){ 9 | return (