I have a simple component like this
import { Component } from \'react\'
export default class SearchList extends Component(){
constructor(props){
sup
When you write a react component extending React.Component
you don't need the extra ()
after React.Component
Use this
export default class SearchList extends Component{
constructor(props){
super(props);
}
render(){
const { placeholder } = this.props;
return(
<div className="searchList">
<input type="text" placeholder={placeholder}/>
<button>Search</button>
</div>
)
}
}