Writing
MMKV vs AsyncStorage vs SQLite vs SecureStore: Which React Native Storage to Use
Compare MMKV, AsyncStorage, SQLite and SecureStore for React Native: how each works, speed, real app examples and a simple guide to pick the right one.
Arbab Naseer Published Last updated 10 min read
- React Native
- Expo
- MMKV
- SQLite
- TypeScript
- Performance
Short answer: use MMKV for small values your app reads and writes all the time (settings, flags, cached JSON, persisted state), SQLite when your data has tables, relations or needs search and filters, SecureStore or Keychain for tokens and anything secret, and AsyncStorage only for a few small values when speed does not matter or you cannot add native code. Most production apps end up using two or three of these together.
In the sports social network I work on, local data runs through MMKV while server data goes through TanStack Query. In ClientInfoTracker, an offline records app, everything lives in SQLite because the data is a real table that people search and filter. This guide explains how each storage option works, what it is built on, and which kind of app it fits.
The options at a glance
| Storage | Type | API | Built on | Encrypted | Best for |
|---|---|---|---|---|---|
| AsyncStorage | Key value | Async (Promises) | SQLite on Android and iOS, IndexedDB on web | No | A few small values, quick prototypes |
| MMKV | Key value | Sync | C++ (Tencent MMKV), JSI and Nitro Modules | Optional (AES) | Hot data read and written often |
| SQLite | Relational database | Async or sync | SQLite C library | Optional (SQLCipher) | Tables, relations, search, large lists |
| SecureStore / Keychain | Key value | Async (sync also available in SecureStore) | iOS Keychain, Android Keystore | Yes | Tokens, sessions, passwords, keys |
| WatermelonDB | Reactive database | Async, observable | SQLite underneath | Through SQLite | Big offline first apps with sync |
Versions in this article are the ones on npm when I wrote it (October 2026): react-native-mmkv 4.3.2, @react-native-async-storage/async-storage 3.1.1, expo-sqlite and expo-secure-store from Expo SDK 58, react-native-keychain 10.0.0.
AsyncStorage: the simple default
AsyncStorage is the storage most tutorials start with. It used to ship inside React Native itself, then moved to a community package, and it is still the “default” many developers know.
How it works: you call a JavaScript function, it returns a Promise, and a native module does the actual read or write in the background. Version 3 rewrote the native side: on Android, iOS and macOS the data now lives in SQLite, and on the web it uses IndexedDB. It only stores strings, so objects go through JSON.stringify and JSON.parse. Nothing is encrypted.
Version 3 is also instance based. You create a named storage instead of using one global object:
import { createAsyncStorage } from '@react-native-async-storage/async-storage';
const storage = createAsyncStorage('app');
await storage.setItem('onboardingSeen', 'true');
const seen = await storage.getItem('onboardingSeen'); // 'true' or null
// Batch calls are much cheaper than a loop of single calls
await storage.setMany({ theme: 'dark', language: 'en' });
The default import (import AsyncStorage from ...) still points to the old v2 storage, so existing apps keep their data after upgrading. The migration guide covers the changes.
Use AsyncStorage when:
- You store a handful of small values, like “has the user seen onboarding” or the chosen theme.
- You are prototyping and do not want to think about storage yet.
- A library you use expects an async
getItemandsetIteminterface and you have no reason to swap it.
Avoid it when you read values on every render or at startup in a hot path, or when the data is large. Every call is a round trip through a Promise, and that adds up quickly.
MMKV: the fastest key value storage
MMKV is a key value storage framework written in C++ by the WeChat team at Tencent. react-native-mmkv, maintained by Marc Rousavy and Margelo, brings it to React Native.
How it works: MMKV maps its file straight into memory with mmap and encodes values with protobuf. When you write, the change lands in memory and the operating system flushes it to disk, so you never wait for a disk write in JavaScript. The React Native binding talks to C++ through JSI (version 4 is a Nitro Module), with no bridge and no Promises. Every call is synchronous:
import { createMMKV } from 'react-native-mmkv';
export const storage = createMMKV();
storage.set('user.name', 'Arbab');
storage.set('feed.lastSeenId', 1042);
storage.set('settings.autoplay', true);
const name = storage.getString('user.name'); // 'Arbab'
const autoplay = storage.getBoolean('settings.autoplay'); // true
It stores strings, numbers, booleans and ArrayBuffers directly, supports several isolated instances (for example one per logged in user), optional AES encryption, and React hooks like useMMKVString.
How much faster is MMKV?
The StorageBenchmark project reads one value 1000 times from each storage library. These are its published results:
That makes MMKV about 20 times faster than AsyncStorage for reads, and around 4 times faster than the next best option. The MMKV README rounds it up to “~30x”. Keep in mind the benchmark is from the React Native 0.68 era and used AsyncStorage before its v3 rewrite, so treat the exact ratio as a guide, not a promise. The order has not changed in any test I have seen. I go deeper on speed, and how to measure it in your own app, in how to make local storage fast in React Native.
Use MMKV when your app reads and writes often:
- Social and content apps: the last seen post, feed filters, draft text, muted users, autoplay settings. This is how I use it in SocialApp.
- Chat apps: unread counts, draft messages per conversation, the last sync timestamp.
- E-commerce: the cart, recently viewed products, the selected currency.
- Any app with persisted state: Zustand, Redux or Jotai stores, and the TanStack Query cache, so the app opens with data already on screen.
Things to know: react-native-mmkv 4 needs React Native 0.76 or newer and native code, so it does not run in Expo Go. You need a development build, which I explain in Expo Go vs development builds. MMKV keeps its data in memory, so it is not the place for thousands of records or big files.
SQLite: when your data has tables and relations
SQLite is a full SQL database in a single file. It is the most widely used database engine in the world, and every iPhone and Android phone already ships with it.
How it works: the SQLite C library runs inside your app. You create tables, add indexes and run SQL queries. The database only loads the rows a query needs, so it handles tens of thousands of records without loading everything into JavaScript memory. In React Native you use it through a binding:
- expo-sqlite: the official Expo package, works in Expo Go, with async and sync APIs and optional SQLCipher encryption.
- op-sqlite: a JSI binding focused on raw speed, with SQLCipher, FTS5 full text search and sqlite-vec plugins.
- WatermelonDB: a reactive database on top of SQLite. It loads records lazily and re-renders components when data changes, and has a sync protocol for your backend.
A small example with expo-sqlite:
import * as SQLite from 'expo-sqlite';
const db = await SQLite.openDatabaseAsync('shop.db');
await db.execAsync(`
PRAGMA journal_mode = WAL;
CREATE TABLE IF NOT EXISTS products (
id INTEGER PRIMARY KEY NOT NULL,
name TEXT NOT NULL,
category TEXT NOT NULL,
stock INTEGER NOT NULL
);
CREATE INDEX IF NOT EXISTS idx_products_category ON products (category);
`);
await db.runAsync('INSERT INTO products (name, category, stock) VALUES (?, ?, ?)', 'Tea', 'drinks', 40);
const lowStock = await db.getAllAsync<{ name: string; stock: number }>(
'SELECT name, stock FROM products WHERE category = ? AND stock < ? ORDER BY stock',
'drinks',
10
);
Try writing that “low stock drinks, sorted” query with a key value store. You would load every product into memory, parse the JSON and filter it in JavaScript. SQLite does it with an index in a few milliseconds.
Use SQLite when:
- Offline first business apps: point of sale, inventory, orders, invoices, customer records. My ClientInfoTracker app is built this way (in Flutter with sqflite, but the idea is identical in React Native).
- Notes, journals, to do and expense apps where people search, sort and filter.
- Anything with relations: orders that belong to customers, messages that belong to conversations.
- Large lists that you page through instead of loading at once.
Avoid it for a handful of settings. Creating tables and writing migrations for three flags is overkill; MMKV does that job better.
Secure storage: tokens, sessions and secrets
Neither AsyncStorage nor plain MMKV is a safe place for an auth token. Their files are protected by the app sandbox, but on a rooted or jailbroken phone, or from an unencrypted device backup, they can be read as plain text.
How it works: secure storage libraries hand your value to the operating system’s own vault. On iOS that is the Keychain. On Android the value is encrypted with a key that lives in the Android Keystore, which can be backed by dedicated hardware, so the key never enters your app’s memory.
- expo-secure-store: simple key value API, works in Expo Go, optional biometric protection.
- react-native-keychain: more control over access rules, biometrics and security levels, popular in bare React Native apps.
import * as SecureStore from 'expo-secure-store';
await SecureStore.setItemAsync('refreshToken', token);
const saved = await SecureStore.getItemAsync('refreshToken');
await SecureStore.deleteItemAsync('refreshToken'); // on logout
Use secure storage for: access and refresh tokens, session ids, a user’s PIN or password (if you really must store it), per user API keys, and the encryption key for an encrypted MMKV or SQLite database.
Avoid it for large or frequently read data. It is slower than MMKV, and the Expo docs warn that some iOS versions reject values above roughly 2048 bytes. Store a token, not a whole user profile. I cover the full setup, including what happens on logout and reinstall, in how to store auth tokens securely in React Native.
How to decide which storage your app needs
Ask four questions about each piece of data, not about the app as a whole:
- Is it secret? If leaking it would let someone act as the user, it goes in SecureStore or Keychain. Stop here.
- Does it have structure? If you need to search, sort, filter, join or page through it, use SQLite (or WatermelonDB for large synced data).
- Is it read or written often, or needed at startup? Use MMKV. Synchronous reads mean no loading flash on launch.
- None of the above, and only a few values? AsyncStorage is fine, though MMKV still costs you nothing extra if it is already installed.
| If your app needs to… | Use |
|---|---|
| Read and write small values very fast | MMKV |
| Open with the last state already on screen | MMKV (persist your store or query cache) |
| Store a few flags in an Expo Go prototype | AsyncStorage |
| Keep hundreds or thousands of records offline | SQLite |
| Search, filter and sort local data | SQLite |
| Sync a large local database with a server | WatermelonDB |
| Keep login tokens and sessions safe | SecureStore or Keychain |
| Store photos, PDFs or other big files | The file system (expo-file-system), with the path in SQLite or MMKV |
Using more than one storage together
There is no rule that says one app gets one storage. This is a setup I use often:
- SecureStore: the refresh token and the MMKV encryption key.
- MMKV: user preferences, feature flags, drafts, and the persisted TanStack Query cache.
- SQLite: only if the app has real offline data, such as orders or records.
Each tool does the job it is good at, and none of them is stretched beyond it.
FAQ
Is MMKV better than AsyncStorage?
For speed, yes. MMKV is synchronous and about 20 times faster for reads in the published StorageBenchmark. AsyncStorage still makes sense when you cannot add native code, for example inside Expo Go, or when you only store a couple of values and speed does not matter.
Can I use MMKV in Expo?
Yes, but not in Expo Go. react-native-mmkv contains native code, so you install it with npx expo install react-native-mmkv react-native-nitro-modules and run your app in a development build created with npx expo run:android, npx expo run:ios or EAS Build.
Is AsyncStorage deprecated?
No. AsyncStorage is maintained by the community and version 3 was a big rewrite with a SQLite backend and named instances. It was removed from React Native core years ago, which is where the “deprecated” idea comes from.
Should I store JWT tokens in AsyncStorage or MMKV?
No. Store tokens in expo-secure-store or react-native-keychain, which use the iOS Keychain and Android Keystore. If you need fast access during a session, keep the token in memory after reading it once.
When should I use SQLite instead of MMKV in React Native?
Use SQLite when the data is a list of records you need to query: search, filter, sort, paginate or relate to other records. Use MMKV for individual values you read by key. A good sign you picked wrong is storing a big JSON array in MMKV and filtering it in JavaScript.
Is SQLite slow in React Native?
Not when it is used well. Modern bindings like expo-sqlite and op-sqlite run queries on the native side, and with indexes and transactions a query over thousands of rows usually finishes in a few milliseconds. It is slower than MMKV for single key lookups, because it does more work.
Want the speed side in detail? Read how to make local storage fast in React Native. If you need a React Native app built with the right storage from day one, get in touch.