title: react-native axios resolve callback function not executed
body: <p>I want to set a callback function after making a post request with axios.
  this code works.</p>
  
  <pre><code>onButtonPress(){
  this.setState({ status: null, loading: true });
  
  axios.post(url, {
      'email': this.state.email,
      'password': this.state.password
  })
  .then(response =&gt; {
    this.setState({
      email: '',
      password: '',
      status: 'Authentication Successful',
      loading: false
    })
  })
  .catch(this.onLoginFail.bind(this))
  }
  </code></pre>
  
  <p>But when assign the callback to a separate function like this, the function does not resolve the promise</p>
  
  <pre><code>onButtonPress(){
  this.setState({ status: null, loading: true });
  
  axios.post(url, {
      'email': this.state.email,
      'password': this.state.password
  })
  .then(response =&gt; {
    this.onLoginSuccess.bind(this)
  })
  .catch(this.onLoginFail.bind(this))
  }
  
  onLoginSuccess(){
    this.setState({
      email: '',
      password: '',
      status: 'Authentication Successful',
      loading: false
    })
  }
  </code></pre>
  
  <p>How would i resolve the promise like the second block of code?</p>