state = {
keyword: 'test'
}
inputChangedHandler = (event) => {
const updatedKeyword = event.target.value;
// May be call for search result
}
render() {
return (
<input
type="text"
placeholder="Search..."
value={this.state.keyword}
onChange={(event)=>this.inputChangedHandler(event)} />
);
}
<input type="text" className="form-control" placeholder="Search..." defaultValue="Search..."/>