Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: #264

Open
ash11055201 opened this issue Aug 17, 2018 · 2 comments
Open

Error: #264

ash11055201 opened this issue Aug 17, 2018 · 2 comments

Comments

@ash11055201
Copy link

i'm following React course.There is an error that i have been for over an hour.Can anyone please solve this..
I want to extend Component of react class to create a search bar but can't do it:
capture

Code for search_bar:

`import React, {'Component'} from 'react';

const SearchBar extends Component {
render() {
return <input onChange={(event) => console.log(event.target.value)} />;
}
}

export default SearchBar;
`
Code of index:

`import React from 'react';
import ReactDOM from 'react-dom';

import SearchBar from './components/search_bar';
const API_KEY='AIzaSyCoeaT4zM-lPerhzktn9GKQHEQdQXWFIdE';
//create a new component
const App=() => {
return (

;
) } ReactDOM.render(,document.querySelector('.container')); `

Please solve this as soon as possivle :p

@kelvinkhai
Copy link

change your
import React, {'Component'} from 'react';
to
import React, { Component } from 'react';

the single quotes is not needed.

@ash11055201
Copy link
Author

ash11055201 commented Aug 23, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants