title: Alert prompt to function not working in react native
body: <p>I have a button on my page that prompts an alert. If that user selects <code>Yes</code>, I then want the <code>exit()</code> function to run. However, the way it is coded now, for some reason nothing happens.</p>
  
  <p>Does anyone know what I am doing wrong?</p>
  
  <pre><code>import React, { Component } from 'react';
  import { ActivityIndicator, AsyncStorage, Button, StatusBar, Text, StyleSheet, View, TextInput, Alert } from 'react-native';
  
  type Props = {};
  export default class IDScreen extends Component&lt;Props&gt; {
  
    static navigationOptions = {
      title: 'Identification',
    };
  
    exit = async () =&gt; {
      alert("I should see this but I don't");
      await AsyncStorage.clear();
      this.props.navigation.navigate('Login');
    }
  
    promptExit() {
      Alert.alert("Are you sure?", "You can't be serious.", [
        {text: 'Yes, Sign out', onPress: async () =&gt; this.exit },
        {text: 'Cancel', onPress: () =&gt; console.log('Cancel Pressed'), style: 'cancel'},
      ],
      { cancelable: true });
    }
  
    render() {
      return (
        &lt;View style={styles.container}&gt;
          &lt;Text style={styles.footerText} onPress={this.promptExit}&gt;Sign Out&lt;/Text&gt;
        &lt;/View&gt;
  
      );
    }
  
  }
  </code></pre>