React 'Component' is not defined

Hello everyone. I am having a problem with my code, I changed one unrelated thing and for some reason it just broke completely. I am getting the following error

./src/people.js  Line 3:22:  'Component' is not defined  no-undef

And this is people.js

import React from 'react';

class People extends Component {
    state = {  }
    render() { 
         const {name,age,sex} =this.props;
        return ( 
            <div className='people'>
<div>Name: {name}</div>
<div>Age: {age} </div>
<div>Sex: {sex}</div>
export default People;

What am I missing here?

You haven’t imported Component

import React from 'react';

class People extends Component {


import React, { Component } from "react"

// Same class definition
class People extends Component {

Or, more explicit:

import React from "react"
// Same import definition

class People extends React.Component {
1 Like

you need to import Component class from react ( like - import React, {Component} from ‘react’) or directly reference it like React.Component.

Yes, that was the problem.
I will just quietly excuse myself for not seeing that.
Thank you

1 Like

It’s easy done, don’t worry about it! (easy fix as well!)