title: Possible Unhandled Promise Rejection (id: 0): ReferenceError: user is not defined ReferenceError: user is not defined
body: <p>I have stored data user with AsyncStorage when i want to get it, it renders null in alert and the above error in the console,i don't know why.<br>
  I can not see why it returns null with user but token all is well</p>
  
  <p><strong>profile.js :</strong></p>
  
  <pre><code>  import React, {Component} from 'react';
    import { StyleSheet, Text, View, Image, TouchableOpacity,AsyncStorage} 
    from 'react-native';
    import { Container, Content, Header,Right, Left, Body} from 'native- 
    base';
    import Feather from 'react-native-vector-icons/Feather';
    export default class Profile extends Component {
    constructor (props){
      super(props);
      this.state = {
         user: null
      }
    }
    componentDidMount(){
       this.fetchData();
    }
    fetchData = async() =&gt;{
        let username = await  AsyncStorage.getItem('user')
       this.setState({
              user: username
          })
           alert(user)
           console.log(user)
       };
    render(){return (....)} 
  </code></pre>
  
  <p>here when i stock the data user and token.<br>
  <strong>Signin.js :</strong></p>
  
  <pre><code> signInMethod =  () =&gt; {
  this.setState({
    showProgress : true
  });
  return fetch(url, {
    method: "POST",
    headers: {
      'Accept': "application/json",
      'Content-Type': "application/json",
    },
    body : JSON.stringify({
      email : this.state.userEmail,
      password : this.state.userPassword
    })
    })
    .then((response) =&gt; response.json())
    .then((res) =&gt; {
      //if there was an error 
      if(res.error){
        //Alert.alert("رسالة","المرجو التأكد من صحة البيانات");
        this.setState({
          error: 'المرجو التأكد من صحة البيانات'
        });
        return;
      }
      //if there was no error then store the jwt in the localstorage
      this.setState({
        customerData : res.customer
      });
      if (this.state.customerData &amp;&amp; res.token) {
      //we store the user data to be used localy
       AsyncStorage.setItem('user',JSON.stringify(res.customer));
      AsyncStorage.setItem('jwt', res.token);
        AsyncStorage.getItem('user');
        updateLogin(res.token);
         this.props.navigation.navigate('Home');
      }
     })
    .catch((err) =&gt; {
      Alert.alert("المرجو اعادة المحاولة لاحقا");
    })
    }    
  </code></pre>
  
  <p>help please.  </p>