title: React Native progress bar percentage not staying the same after closing the app
body: <p>Every time I press a button the progress bar will go up %20 but the problem is for instance if its at %80 and I reload the app it will show it as %60 instead, I was wondering if anyone could help me fix this issue to have the progress bars percentage stay the same after reloading or closing the app.</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 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',
    }
  });
  
  var PROGRESS = 0;
  
  class BasicStorageExample extends React.Component {
    constructor(props) {
      super(props);
      this.state = {
        progress: PROGRESS
      }
    }
  
    componentDidMount() {
      AsyncStorage.getItem('progressbar')
        .then((value) =&gt; {
          JSON.parse(value);
          this.setState({
            progress: value 
          });
          console.log('Progress on load: ' + value);
        })
        .done();
    }
  
    onButtonPress() {
      AsyncStorage.setItem('progressbar', JSON.stringify(PROGRESS))
        .then(() =&gt; {
          JSON.parse(PROGRESS);
          this.setState({
            progress: PROGRESS += 0.2
          });
          console.log('Progress on Button Press: ' + PROGRESS);
        })
        .done();
    }
  
    onButtonClearPress() {
      AsyncStorage.setItem('progressbar', JSON.stringify(PROGRESS))
        .then(() =&gt; {
          JSON.parse(PROGRESS);
          PROGRESS = 0;
          this.setState({
            progress: 0
          });
        })
        .done();
    }
  
    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
            ref="button"
            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>