Reputation: 11
I need help please.
import React from 'react';
import logo from './logo.svg';
import './App.css';
import Greet from './components/Greet'
class App extends Component {
render(){
return(
<div className="App">
<Greet/>
</div>
);
}
}
export default App;
I am facing this error when I run the code:
./src/App.js Line 6:19: 'Component' is not defined no-undef
What should I do?
Thanks in advance!
Upvotes: 1
Views: 4506
Reputation: 7156
Because you forget to import component
from react
.
Add this line on top of the program
import React, { Component } from 'react';
Upvotes: 2