const handleDeleteProduct = product => { Alert.alert('Delete Product', `Are you sure you want to delete ${product.id}?`, [ { text: 'Cancel', style: 'cancel', }, { text: 'Delete', style: 'destructive', onPress: async (key = product.item) => { try { await AsyncStorage.removeItem(key); // RNRestart.Restart(); } catch (e) { console.error(e); } }, }, ], ); };
*Please help me, this removeItem does not work, eventhough i follow the documentation in https://react-native-async-storage.github.io/async-storage/docs/api
I try to delete an Item using onLong event in TouchableWithoutFeedback element in a reactnative element, I enclose the TouchableWithoutFeedback in flatlist.