What is wrong with this React class?

What is wrong with this React class?
0.0 0

#1
import React, { Component } from 'react';

class Header extends Component {
  constructor(props) {
    super(props);
    this.state = {
      data: []
    }
  }

  render() {
    return (
      <div className="header">

      <ul className="">
        <li>Become a host</li>
        <li>Earn credit</li>
        <li>Help</li>
        <li>Sign up</li>
        <li>Log in</li>
      </ul>
      </div>
    );
  }
}

export default Header;

I keep getting an error that says ‘Component is not defined’

Aren’t I importing it at the top?


#2

did you install react via npm or yarn etc?


#3

Turns out I had some file path issues due to renaming the file and moving it. Drove me nuts for an hour.