title: React-native store data between sessions
body: <p>I need to store some user data, such as settings, login, token etc. between session. Tried asyncstorage but when I restart app, data in it gets deleted. Found some modules that refers to keychain or NSUserDefaults, but I don't know which and any of it is good for this purpose. <br>
  The main feature is that I can get that data even after app is killed and restarted.  Mostly on iOS but if it would be also on Andorid, that would be great.<br>
  Anybody had some experience with it? </p>
  
  <p><strong>EDIT:</strong><br>
  I tried using asyncstorage. But it doesn't do a thing when you kill and restart app. <br>
  My code for storing data:</p>
  
  <pre><code> AsyncStorage.setItem("prefix", responseData['prefix'])
   AsyncStorage.setItem("api_token", responseData['api_token'])
  </code></pre>
  
  <p>And retrieving data: </p>
  
  <pre><code>async _checkAutoLogin(){ 
      var prefix;
      var token;
      try { 
         prefix = await AsyncStorage.getItem("prefix");
         token = await AsyncStorage.getItem("api_token"); 
  } catch (error) { 
        AlertIOS.alert('AsyncStorage error: ' + error.message); 
      } 
  </code></pre>