Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react native asyncstorage setItem example

setStringValue = async (value) => {
  try {
    await AsyncStorage.setItem('key', value)
  } catch(e) {
    // save error
  }

  console.log('Done.')
}
Source by react-native-async-storage.github.io #
 
PREVIOUS NEXT
Tagged: #react #native #asyncstorage #setItem
ADD COMMENT
Topic
Name
8+9 =