UNPKG

vegas-react-native

Version:

A specialized set of basic functions utilities to build React Native applications

27 lines (23 loc) 577 B
import AsyncStorage from '@react-native-async-storage/async-storage' import cache from './cache' const removeItem = ( key , verbose = false ) => { cache.remove(key) ; AsyncStorage .removeItem(key) .then( () => { if( verbose ) { console.log('»»» storage removeItem succeed.') } }) .catch( () => { if( verbose ) { console.warn('»»» storage removeItem failed.' ) ; } }) ; }; export default removeItem ;