title: How to keep user logged in (store userId with AsyncStorage)
body: <p>I am able to Login using my username and password (hardcoded), however, after login in I want to fetch some data from an API which can be done only if I am authenticated. 
  So, the question is how can I keep the user logged in? </p>
  
  <p>I am not that good in React-Native so any help would be highly appreciated!</p>
  
  <p><strong>Here is my code:</strong></p>
  
  <pre><code>import React, { Component } from 'react';
  import { Text, View, StyleSheet,AsyncStorage, FlatList, AppRegistry } from 'react-native';
  import { ListItem } from 'react-native-elements';
  
  
  export default class BMPServer extends React.Component {
    constructor(props) {
      super(props);
      this.state = {
         username: 'testuser', 
         password: 'mypasswordhere',
         signedIn: false,
        checkedSignIn: false 
        };
  
  
      this.getAllDocuments();
  
   }
  getAllDocuments = () =&gt; {
  
    fetch('https://example.dk/rest/Login/Authenticate/?businessId=1&amp;solutionId=1', {
              method: 'POST',
              headers: {
                Accept: 'application/json',
                'Content-Type': 'application/json',
              },
              body: JSON.stringify({
                username : this.state.username,
                password : this.state.password,
              })
            }) 
  
          .then((response) =&gt; response.json())
  
        .then((responseDocs) =&gt; {
  
          console.log("YOU HAVE SUCCSFULLY LOGGED IN:", responseDocs) 
  
  });}
  </code></pre>