Create a Front-End App with React Skill Path(ravenous 1 part)

Hi, Im doing the Ravenous first part and following all the indications and the video too, I don’t know what am I doing wrong that , on App.js and in general part I’m getting these errors

I don’t know why these errors are happening,
I’m having two problems

  1. On the App.js I got an error where it says that “Component” is defined but never used

App.js (this is my code)

import React, {Component} from 'react'

import './App.css';

import BusinessList from './components/BusinessList/BusinessList';

import SearchBar from './components/SearchBar/SearchBar';

class App extends React.Component {

  render() {

      return (

        <div className="App">


        <SearchBar />

     <BusinessList />






export default App;
  1. I’m not having any representation about this web on the browser, in fact I just got this error

Thank you for your help

please make sure to format your code when posting it here to make it easier for anyone to read it and help you.
The error messages are already very explicit, I’ll try to add what I can:

In App.js you import ‘Component’ from react. Why? What is that supposed to do? It’s a serious question, I never used that and don’t know if that is even exported from React. But you also don’t use it anywhere in your code. So you can just delete it and just import React from ‘react’. This usually is just a warning and doesn’t prevent your code from compiling locally. It becomes a problem when you want to compile a production version.

Edited after hint from @stetim
The other error is causing the real trouble: You import a css file to the SearchBar component. In this css file you import an image (background_search_desktop.jpg) that does not exist in the folder you’re trying to import it from: src/components/SearchBar
Either you try to import it from the wrong folder or you have a typo.

Thank you very much for your help, I already resolved it :grinning:

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.