title: Adding and removing items in AsyncStorage
body: <p>Looking to add some items, display a list then be able to delete each item separately, my understanding of this problem is that I have to create an array then update it each time I want to delete an item then save. That seems quite complex for a basic db operation, I tried several approachs don't know if my code is what I'm supposed to do. Can someone please point to the right direction?</p>
  
  <p>The last error I'm facing:</p>
  
  <blockquote>
    <p>Object is null or undefined from
        C:\Users\oled\stock\node_modules\react-native\Libraries\polyfills\Array.es6.js:24:26
    _toConsumableArray</p>
  </blockquote>
  
  <pre><code>  FetchValue = () =&gt; {
      AsyncStorage.getItem("Favorites").then((value) =&gt; {
        this.setState({
          favs: JSON.parse(value)
        });
      }).done();
    };
  
    SaveValue = () =&gt; {
      const newFavs = [...this.state.favs, this.state.UserInput];
      this.setState({ favs: newFavs, UserInput: '' }, () =&gt; {
          AsyncStorage.setItem("Favorites", JSON.stringify(this.state.favs));
          Keyboard.dismiss()
      });
    };
  
    RemoveValue(item){
        const index = this.state.favs.indexOf(item);
        const newArray = [...this.state.favs];
        newArray.splice(index,1);
        this.setState({ favs: newArray });
        AsyncStorage.setItem("Favorites", JSON.stringify(newArray));
    }
  </code></pre>
  
  <p>Full code : <a href="https://pastebin.com/p7sbQTNG" rel="nofollow noreferrer">https://pastebin.com/p7sbQTNG</a></p>