StephenGrider / ReduxSimpleStarter

Starter pack for an awesome Udemy course
MIT License
3.56k stars 4.63k forks source link

Error: #264

Open ash11055201 opened 6 years ago

ash11055201 commented 6 years ago

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 commented 6 years ago

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

the single quotes is not needed.

ash11055201 commented 6 years ago

Thank You very much

On Thu 23 Aug, 2018, 7:57 AM string, notifications@github.com wrote:

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

the single quotes is not needed.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/StephenGrider/ReduxSimpleStarter/issues/264#issuecomment-415261413, or mute the thread https://github.com/notifications/unsubscribe-auth/Aogrs0cTKOGGwkA8j_GMnesvk-nP2PcWks5uThMZgaJpZM4WCDmO .