Posts

Showing posts with the label asyncstorage

AsyncStorage in React Native

Image
Hey Guys!! Good Day!! AsyncStorage Component is a simple storage system, that is globally available to React Native Application. It is persistent, means data that has been stored will continue to exist even when quiting or restarting Application or your phone. Its also asynchronous, as its name implies.  The following are some of the main methods for AsyncStorage setItem getItem removeItem clear multiSet multiGet multiRemove Optionally, we can add a callback to the methods. To know more methods in AsyncStorage, refer AsyncStorage . setItem This method is to save key and its value in AsyncStorage.                   AsyncStorage.setItem('key', 'value')                                         .then( () =>{                                                 //Operation to do                                        }); getItem This method is to get the saved value, using its key.                    AsynStorage.getItem(