Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

async storage get item

_retrieveData = async () => {
  try {
    const value = await AsyncStorage.getItem('TASKS');
    if (value !== null) {
      // We have data!!
      console.log(value);
    }
  } catch (error) {
    // Error retrieving data
  }
};
Source by reactnative.dev #
 
PREVIOUS NEXT
Tagged: #async #storage #item
ADD COMMENT
Topic
Name
7+4 =