title: React this.setState is undefined
body: <p>This is an unfinished version of the class, but the finished version of class Typehead is supposed to print out a list of choices from props that match the input - basically an autocomplete function. The issue I am having is when I call the handleChange method, the error "cannot read property 'setState' of undefined" occurs. Here is the code: </p>
  
  <pre><code>import React from 'react'
  
  export default class Typehead extends React.Component {
    constructor() {
      super()
      this.state = {}
    }
  
    handleChange(e) {
      this.setState(previousState =&gt; {
        previousState = e.target.value
        return {previousState}
      })
      console.log(this.state)
    }
  
    render() {
      return (
        &lt;form&gt;
          &lt;div className="input-group"&gt;
            &lt;label&gt;
              Choose a Track:
              &lt;input onChange={this.handleChange} type="text" 
              className="form-control" placeholder="Song Name"/&gt;
            &lt;/label&gt;
          &lt;/div&gt;
        &lt;/form&gt;
      )
    }
  }
  </code></pre>
  
  <p>Any explanation as to why 'this' is undefined in handleChange would be greatly appreciated!</p>