{"size": 659, "ext": "js", "max_stars_repo_path": "src/Components/search_bar.js", "max_stars_repo_name": "Raunak1001/Youtube-Application", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/Components/search_bar.js", "max_issues_repo_name": "Raunak1001/Youtube-Application", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/Components/search_bar.js", "max_forks_repo_name": "Raunak1001/Youtube-Application", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.9666666667, "max_line_length": 59, "alphanum_fraction": 0.593323217}
import React,{Component} from 'react';

/*const SearchBar=()=>{
    return <input/>
};*/

class SearchBar extends Component {
    constructor(props) {
        super(props);
        this.state = {term:' '};
        this.onInputChanged=this.onInputChanged.bind(this);
}

onInputChanged(event){
    this.setState({term:event.target.value});
    this.props.onSearchTermChange(event.target.value)
}

    render(){
        return (
            <div className='search-bar'>
            <input className='search-bar input'
            value={this.state.term}
            onChange={this.onInputChanged}
        />
            </div>)
    }
}

export default SearchBar;