“Asyncstorage” Kod odpowiedzi

AsyncStorage.getallkeys

importData = async () => {
  try {
    const keys = await AsyncStorage.getAllKeys();
    const result = await AsyncStorage.multiGet(keys);

    return result.map(req => JSON.parse(req)).forEach(console.log);
  } catch (error) {
    console.error(error)
  }
}
Dark Dormouse

Asyncstorage

npx expo install @react-native-async-storage/async-storage
Frantic Flatworm

React Native Storage

npm install react-native-storage
npm install @react-native-community/async-storage
Wandering Wren

Odpowiedzi podobne do “Asyncstorage”

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu