Complete the code to import AsyncStorage from the correct package.
import [1] from '@react-native-async-storage/async-storage';
You must import AsyncStorage exactly from '@react-native-async-storage/async-storage' to use it.
Complete the code to save a value with AsyncStorage.
await AsyncStorage.[1]('username', 'john_doe');
Use setItem to save a key-value pair in AsyncStorage.
Fix the error in the code to retrieve a value from AsyncStorage.
const value = await AsyncStorage.[1]('username');
Use getItem to retrieve a value by key from AsyncStorage.
Fill both blanks to remove a stored value and then clear all storage.
await AsyncStorage.[1]('username'); await AsyncStorage.[2]();
removeItem deletes a specific key, and clear removes all keys from AsyncStorage.
Fill all three blanks to save, retrieve, and log a value using AsyncStorage.
await AsyncStorage.[1]('token', 'abc123'); const token = await AsyncStorage.[2]('token'); console.log([3]);
First, setItem saves the token. Then, getItem retrieves it. Finally, logging the variable token shows the stored value.
