title: Setting TextInput value from AsyncStorage in React Native
body: <p>I have successfully stored my email and password value in <strong>AsyncStorage</strong> in ReactNative.</p>
  
  <p>Now, I am also able to fetch the values from <strong>AsyncStorage</strong> when application getting started.</p>
  
  <p>I am displaying values using <code>Alert.alert()</code> right now.</p>
  
  <p>I am confused that How can I set that values in my two TextInputs : </p>
  
  <p><strong>1. Email and 2. Password.</strong></p>
  
  <p>I have little bit idea about state. It might be possible using state.
  But how ?</p>
  
  <p>Any idea that How can I change or set the value in <code>TextInput</code> dynamically ?</p>
  
  <p>Thanks.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>States :</p>
  
  <pre><code>state = {
      email: '',
      password: '',
      register: false,
      activity: false,
      isRemember:false,
    }
  
  
  
  componentWillMount(){
         //To handle Remember Me :
         this._checkForRememberMe();
    }
  </code></pre>
  
  <p>On Login Success : </p>
  
  <p><code>this._storeRememberME()</code>;</p>
  
  <pre><code>_storeRememberME=async()=&gt;{
       //SAVING ASYNCSTORAGE VALUE FOR REMEMBER ME : 
       Alert.alert("is Remember state &gt;&gt;"+this.state.isRemember);
       if(this.state.isRemember){
            await AsyncStorage.setItem('username', this.state.email);
        await AsyncStorage.setItem('password', this.state.password);  
    Alert.alert("is Remember state inside &gt;&gt;"+this.state.isRemember);
        await AsyncStorage.setItem('isRemember', 'yes');
     }else{
       const isRemember =AsyncStorage.getItem('rememberMe');
       if(isRemember){
        Alert.alert("Async clear "+this.state.isRemember);
         await AsyncStorage.clear();
       }
     }
    }
  
    // Fetch the token from storage then navigate to our appropriate place
    _checkForRememberMe = async () =&gt; {
      const isRemember = await AsyncStorage.getItem('isRemember');
      if(isRemember){
  
        const username = await AsyncStorage.getItem('username');
        const password = await AsyncStorage.getItem('password');
  
        this.state.email=username;
        this.state.password=password;
        this.state.checkedRemember=true;
        Alert.alert(""+this.state.email+""+this.state.password);
  
      }else{
        this.state.checkedRemember=false;
      }
    }
  </code></pre>
  
  <p>_handleCheck(val) {</p>
  
  <pre><code>if(val){
    this.state.isRemember=true;
  }else{
    this.state.isRemember=false;
  }
  
  Alert.alert("is remember", "&gt;&gt;&gt;"+val);
  </code></pre>
  
  <p>}</p>
  
  <p>checkbox is as below : </p>
  
  <pre><code>&lt;Checkbox
                  onChange={(val) =&gt; this._handleCheck(val)}
                      style={{marginRight:8}}
                      checked={checkedRemember}
                      checkedColor={$primaryBlue}
                      uncheckedColor={$lightGray}
                      iconName='matMix'
                  /&gt;
  </code></pre>