title: Counter with Async Storage in React Native
body: <p>I am new to React Native.
  I want to make a counter using Async storage in React Native Expo.
  Async storage works with string value but I need to use integer value and can't find an example to create it.</p>
  <p><em>I would appreciate it if you suggest with SQLite or if there is a different storage area.</em></p>
  <pre><code>
    storeData = async (counter) =&gt; {
      try {
        await AsyncStorage.setItem('', counter)
      } catch (e) {
        
      }
    }
    getData = async () =&gt; {
      try {
        const value = await AsyncStorage.getItem('counter')
        if(counter !== null) {
  
        }
      } catch(e) {
        
      }
    }
  
    render() {
        return(
          &lt;SafeAreaView style={styles.container}&gt;
            &lt;ImageBackground  style={styles.image}&gt;
                &lt;View style={{marginBottom: 250}}&gt;
                      &lt;Text style={styles.counter}&gt;{counter}&lt;/Text&gt;
                &lt;/View&gt;
                &lt;TouchableOpacity 
                  style={styles.floatingButton1}
                  onPress={this.onAddCounter}&gt;
                  &lt;Text style={{fontSize:13, color:&quot;white&quot;, fontWeight:&quot;600&quot;}}&gt;Tap to Counter&lt;/Text&gt;
                &lt;/TouchableOpacity&gt;
               &lt;TouchableOpacity 
                style={styles.resetButton1}
                onPress={this.onReset1}&gt;
                  &lt;Icon name=&quot;undo&quot; size={20} color=&quot;#900&quot;/&gt;
               &lt;/TouchableOpacity&gt;
            &lt;/ImageBackground&gt;
          &lt;/SafeAreaView&gt;
        );
      }
  
    }
  
  </code></pre>