title: Cannot read property 'navigate' of undefined in a .then() => { }
body: <p>Why can't I navigate to the screen "App" in the following code. I get the error: </p>
  
  <blockquote>
    <p>Cannot read property 'navigate' of undefined</p>
  </blockquote>
  
  <pre><code>  async signIn() {
      const { username, password } = this.state
      await Auth.signIn(username, password)
      .then(user =&gt; {
        this.setState({ user })
        this.props.navigation.navigate("App");
        Alert.alert('Signed In Successful!')
      })
      .catch(err =&gt; {
          console.log('Error when signing in: ', err)
          Alert.alert('Error when signing in: ', err)
      })
    }
  }
  </code></pre>