React Native interview question · Most asked

Where should you store data on the device, and what should never go in AsyncStorage?

Create a free account to save this page, take notes and track your progress. Sign in

Summary

AsyncStorage for small, non-sensitive key-value data; SQLite for structured data you query; the file system for files; and secure storage (Keychain/Keystore via expo-secure-store) for tokens and secrets, which must never go in AsyncStorage because it isn't encrypted.

Longer Answer

AsyncStorage stores plain strings and rewrites whole values, so it suits settings and small caches. For hundreds or thousands of records with filtering and sorting, use expo-sqlite. Store large binary data as files and keep only paths in the database.

Key Points

  • AsyncStorage: small, non-sensitive.
  • SQLite: queryable data.
  • SecureStore: tokens and secrets.
  • Files for blobs.

Deep dive: Mobile Apps with React Native and Expo: Working Offline

Explanation

What interviewers look for

Clear separation of sensitive vs non-sensitive storage, and matching the store to the data shape.

More most-asked React Native questions

← All React Native questions

Was this page helpful?