Local Storage with AsyncStorage

June 02, 2026 1 min read

AsyncStorage is a simple, asynchronous key/value store for small persistent data like auth tokens and preferences.

import AsyncStorage from '@react-native-async-storage/async-storage';

await AsyncStorage.setItem('token', 'abc123');
const token = await AsyncStorage.getItem('token');
await AsyncStorage.removeItem('token');
Common mistake: AsyncStorage is not encrypted. For secrets (tokens), prefer expo-secure-store or react-native-keychain.

For larger structured data, use a database like WatermelonDB or SQLite.

Summary

AsyncStorage persists small key/value data; use secure storage for secrets and a real DB for large datasets.