title: TypeError: _this2.setState is not a function
body: <p>I don't understand why i'm getting this error. How could i solve it and most importantly why am i getting it? </p>
  
  <p>I'm getting the correct response back from the API but i also get the error right after a make a call.</p>
  
  <pre><code>class App extends Component {
  
    constructor(props) {
      super(props);
  
      this.state = {
        movies: []
      };
    }
  
    videoSearch(term) {
      axios.get(`https://api.themoviedb.org/3/search/movie?api_key=${APIkey}&amp;query=${term}&amp;page=1`)
        .then(response =&gt; this.setState({movies: response.data.results}))
        .catch(err =&gt; console.log(err))
    };
  
  
    render() {
      return (
        &lt;div className="App"&gt;
          &lt;SearchBar onSearchTermChange={this.videoSearch} /&gt;
        &lt;/div&gt;
      );
    }
  }
  
  export default App;
  
  
  
  import React, {Component} from 'react';
  
  
  class SearchBar extends Component {
      constructor(props) {
          super(props);
  
          this.state = { term: "" };
      }
  
      render() {
          return (
          &lt;div className="search-bar"&gt;
              &lt;input
              value={this.state.term}
              onChange={event =&gt; this.onInputChange(event.target.value)}
              /&gt;
          &lt;/div&gt;
          );
      }
  
      onInputChange(term) {
          this.setState({ term });
          this.props.onSearchTermChange(term);
      }
  }
  
  export default SearchBar;
  </code></pre>