Ravenous Part 1 TypeError

Hello all currently working through the Ravenous project.

https://www.codecademy.com/paths/web-development/tracks/front-end-applications-with-react/modules/react-development-setup-and-ravenous-part-1/projects/create-prj-components

I keep getting this error when I try and open using npm start.

TypeError: Class extends value undefined is not a constructor or null

Module../src/components/App/App.js

C:/Users/dan_g/OneDrive/Documents/Codecademy/ravenous/src/components/App/App.js:6

  3 | import SearchBar from '../SearchBar/SearchBar';  4 | import BusinessList from '../BusinessList/BusinessList';  5 | > 6 | class App extends React.Component() {  7 |   render(){  8 |     return (  9 |       <div className="App">

not too sure how to fix this. Any help will be appreciated!

This is my code in App.js:

import React from ‘react’;

import ‘./App.css’;

import SearchBar from ‘…/SearchBar/SearchBar’;

import BusinessList from ‘…/BusinessList/BusinessList’;

class App extends React.Component() {

render(){

return (

  <div className="App">

    <h1>ravenous</h1>

    <SearchBar />

    <BusinessList /> 

  </div>

);

}

}

export default App;

React.Component is a class, so no parentheses are needed.

class MyComponent extends React.Component

1 Like

■■■■. I was searching for so long and knew what line it was but just couldn’t see it.

Just needs an extra pair of eyes. Appreciate it!

1 Like

Sometimes the obvious things are the hardest to spot…

1 Like

I have done everything correct but I still got this error!
This is my code

import React from 'react';
import "./App.css";
import './App.css';
import SearchBar from './components/SearchBar/SearchBar';
import BusinessList from "./components/BusinessList/BusinessList";

class App extends React.Component {
 render() { 
  return (
    <div className="App">
      <h1>ravenous</h1>
      <SearchBar />
      <BusinessList />
    </div>
  );
 }
}

export default App;

this is my error. PLEASE HELP!!!

You have made the exact same error, but in a different file.

If you read the error that you’re getting, you’ll notice how it’s pointing out code in BusinessList.js

2 posts were split to a new topic: Ravenous part 1 type error