I'm trying to import the CarList component which is in /src/components/CarList.js into App.js
I get this error
./src/App.js Attempted import error: './components/CarList' does not contain a default export (imported as 'CarList').
App.js
import React, { Component } from "react"; import logo from "./logo.svg"; import "./App.css"; import CarList from "./components/CarList"; class App extends Component { render() { return ( <div className="App"> <header className="App-header"> <img src={logo} className="App-logo" alt="logo" /> <h1 className="App-title">Welcome to React</h1> </header> <CarList /> </div> ); } } export default App; CarList.js
import React, { Component } from 'react'; class CarList extends Component { render() { return ( <div> This will be the car list </div> ); } } I tried almost everything from the first page of Google, which does not help. What can be wrong?