title: How to keep the memory of app after totally closing the app in React Native
body: <p>I am using react native to build an app and the only problem i am having is that i have a progress bar that keeps track of the users progress but when I close the app completely and open it back up everything resets to its original data. How do I make it so it will keep the data when they close the app?</p>
  
  <p>Not sure how to add in the AsyncStorage
  Here is my code:</p>
  
  <pre><code>'use strict';
  
  var React = require('react-native');
  var ProgressBar = require('react-native-progress-bar');
  
  var {
    AppRegistry,
    AsyncStorage,
    StyleSheet,
    Text,
    View,
    TouchableHighlight
  } = React;
  
  var PROGRESS = 0;
  
  var styles = StyleSheet.create({
    container: {
      flex: 1,
      justifyContent: 'center',
      alignItems: 'center',
      backgroundColor: '#FFF',
    },
    button: {
      alignSelf: 'center',
      marginTop: 50,
      width: 100,
      height: 50,
      backgroundColor: '#0059FF',
      borderRadius: 8,
      borderWidth: 2,
      borderColor: '#0059FF'
    },
    buttonClear: {
      alignSelf: 'center',
      marginTop: 10,
      width: 100,
      height: 50,
      backgroundColor: '#3B3A3A',
      borderRadius: 8,
      borderWidth: 2,
      borderColor: '#3B3A3A'
    },
    buttonText: {
      fontSize: 18,
      textAlign: 'center',
      lineHeight: 33,
      color: '#FFF',
    }
  });
  
  class BasicStorageExample extends React.Component {
    constructor(props) {
      super(props);
  
      this.state = {
        progress: PROGRESS
      };
    }
  
    onButtonPress() {
      this.setState({
        progress: PROGRESS += 0.2
      });
    }
  
    onButtonClearPress() {
      PROGRESS = 0;
      this.setState({
        progress: 0
      });
    }
  
    render() {
      return (
        &lt;View style={styles.container}&gt;
          &lt;ProgressBar
            fillStyle={{}}
            backgroundStyle={{backgroundColor: '#cccccc', borderRadius: 2}}
            style={{marginTop: 10, width: 300}}
            progress={this.state.progress} /&gt;
          &lt;TouchableHighlight
            style={styles.button}
            underlayColor='#002C7F'
            onPress={this.onButtonPress.bind(this)}&gt;
            &lt;Text style={styles.buttonText}&gt;Done&lt;/Text&gt;
          &lt;/TouchableHighlight&gt;
          &lt;TouchableHighlight
            style={styles.buttonClear}
            underlayColor='#002C7F'
            onPress={this.onButtonClearPress.bind(this)}&gt;
            &lt;Text style={styles.buttonText}&gt;Clear&lt;/Text&gt;
          &lt;/TouchableHighlight&gt;
        &lt;/View&gt;
      );
    }
  };
  
  AppRegistry.registerComponent('BasicStorageExample', () =&gt;     BasicStorageExample);
  </code></pre>