title: React Native - setState doesn't work in promise statement
body: <p>I'm new to react native and I've been trying to create a login page for an app using a modal. There is a problem, however, whenever I try to remove the modal by using</p>
  
  <p><code>this.setState({modalVisable: false})</code> </p>
  
  <p>Inside a <code>.then</code> statement, nothing happens!</p>
  
  <p>When I place the <code>setState</code> inside the <code>.catch</code> statement, it works and the modal disappears. Why won't it work inside <code>.then</code>?</p>
  
  <p>Here's the code:</p>
  
  <pre><code>    loginSubmitted(){
      Turbo({site_id: config.TURBO_APP_ID}).fetch('user', {username: this.state.login.username})
      .then((data=&gt;{
          if(data.length==0){
              return Turbo({site_id: config.TURBO_APP_ID}).createUser(this.state.login)
              }else{
              return Turbo({site_id: config.TURBO_APP_ID}).login(this.state.login)
              }
      }))
      .then((data)=&gt;{
          this.setState({modalVisible: false})
      })
      .catch((err)=&gt;{
          alert(err.message)
          this.setState({modalVisible: false})
      })
  }
  </code></pre>