I have a simple component like this
import { Component } from 'react' 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> ) } }
The somewhere I do <SearchList placeholder="Search Area" />
Why I got error of cannot set property of props of undefined?