Solution : ReactJs Error 'Component' is not defined no-undef. Search for the keywords to learn more about each error. This error occurred during the build time and cannot be dismissed.
When creating a react application the following error comes "'Component' is not defined no-undef."
Here is my code from ReactJs src/App.js
import React from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
render () {
return (
<div className="App">
My First App
</div>
)
}
}
when i try to execute the above program of ReactJs there is a error "'Component' is not defined no-undef."
The solutions is as below
import React, {Component} from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
render () {
return (
<div className="App">
My First App
</div>
)
}
}
This above piece of code fixed the error and page started to render on the browser
thanks alot, keep on posting for help :)
ReplyDeleteThank you very much
ReplyDeleteIt helped me a lot. Thank you very much
ReplyDeleteThanks a ton!!
ReplyDeleteSaved me a lot of trouble!
Thanks a lot.
ReplyDeleteThanks a lot really fixed my bug
ReplyDeleteit still showing that error
ReplyDeletedue to case sensitive it pop out that error
Deletethank you
ReplyDeletegreat job bro
ReplyDeletethanks!
ReplyDeletehello i do that but give me the same error but i create new file called Navbar in folder called Component
ReplyDeleteI admire this article for the well-researched content and excellent wording. I got so involved in this material that I couldn’t stop reading. I am impressed with your work and skill. Thank you so much.best render farm
ReplyDeleteGreat job for publishing such a nice article. Your article isn’t only useful but it is additionally really informative. Thank you because you have been willing to share information with us.render Farm
ReplyDeleteYou have shared a nice article here about the Nike Air Jordan Blue . Your article is very informative and nicely describes the causes and natural remedies of Snoring. I am thankful to you for sharing this article here.Nike Air Jordan Blue online in India
ReplyDeleteGreat job for publishing such a nice article. Your article isn’t only useful but it is additionally really informative. Thank you because you have been willing to share information with us.render Farm
ReplyDelete