I have a list of Items stored with asyncStorage, they all have the same key, using await AsyncStorage.removeItem(key)
function its removes the entire list
of Items is there a way to remove only one single Item.
async removeItemValue(key) {
try {
await AsyncStorage.removeItem(key);
return true;
}
catch(exception) {
return false;
}
What I will do:
Something like:
const value = await AsyncStorage.getItem(theKey);
if (value !== null){
var index = array.indexOf(theItem);
if (index > -1){
value.splice(index, 1);
}
}
AsyncStorage.setItem(theKey, value);