title: Cannot read property 'setState' of undefined even after defining bind(this.submit)
body: <p>I've been working on react js and want to <code>setState</code> for response from firebase.<br>
  So when I'm trying to set value for state, it returns the error ,</p>
  
  <blockquote>
    <p>Cannot read property 'setState' of undefined</p>
  </blockquote>
  
  <p>My code. </p>
  
  <pre><code>class Login extends Component {
      constructor(props) {
          super(props)
          this.state = {email:'',
                      uid:'',
                      password :'',
          }
          this.handleChange = this.handleChange.bind(this)
          this.handleSubmit = this.handleSubmit.bind(this)
          this.signInWithGoogle = this.signInWithGoogle.bind(this)
      }
      handleChange(event) {
          this.setState({
              [event.target.id] : event.target.value
          })
          console.log(this.state.email)
          console.log(this.state.password)
        }
        handleSubmit(e) {
          e.preventDefault()
          firebase.auth().signInWithEmailAndPassword(this.state.email, this.state.password).then(function(result)  {
              console.log(result.user.uid)
              this.setState({ [uid]: [result.user.uid] });
          }).catch(function(error) {
              console.log(error.code)
              console.log(error.message)
              alert(error.message)
             })
        }
  
  </code></pre>
  
  <p>I do have a form to give inputs . 
  Can somebody help me on this .</p>