react native async storage

JavaScript
npm i @react-native-community/async-storageyarn add @react-native-async-storage/async-storage

import AsyncStorage from '@react-native-async-storage/async-storage';
// store item
const storeData = async (value) => {		
  try {
    await AsyncStorage.setItem('@storage_Key', value)
  } catch (e) {
    // saving error
  }
}
// get item
const getData = async () => {
  try {
    const value = await AsyncStorage.getItem('@storage_Key')
    if(value !== null) {
      // value previously stored
    }
  } catch(e) {
    // error reading value
  }
}expo install @react-native-community/async-storageimport { AsyncStorage } from 'react-native';

await AsyncStorage.setItem('@Store:key', 'Example.');

const data = await AsyncStorage.getItem('@Store:key');
//data = "Example."
npm install react-native-storage
npm install @react-native-community/async-storage

Source

Also in JavaScript: