Complete the code to import MMKV storage in React Native.
import { [1] } from 'react-native-mmkv';
You import MMKV from the react-native-mmkv package to use fast storage.
Complete the code to create a new MMKV storage instance.
const storage = new [1]();You create a new instance by calling new MMKV().
Fix the error in the code to save a string value with MMKV.
storage.[1]('username', 'Alice');
The correct method to save a string is setString.
Fill both blanks to read a string value and provide a default if missing.
const name = storage.[1]('username') || [2];
Use getString to read the value and provide a default like 'Guest' if it is missing.
Fill all three blanks to remove a stored key and check if it exists.
storage.[1]('username'); const exists = storage.[2]('username'); console.log(exists === [3]);
Use delete to delete a key, contains to check if it exists, and compare to false after removal.
