content: import React, { Component } from 'react';
  
  class SearchBar extends Component{
    constructor(props){
      super(props);
  
      this.state = { term: '' };
    }
  
    render() {
      //return <input onChange={this.onInputChange} />;
      return (
        <div className="search-bar">
          <input
            value={this.state.term}
            onChange={event => this.onInputChange(event.target.value)} />
          //Value of the inpt : {this.state.term}
        </div>
      );
    }
  
    onInputChange(term){
      //console.log(event);
      this.setState({term});
      this.props.onSearchTermChange(term);
      //console.log(event.target.value);
    }
  }
  
  export default SearchBar;
  