Skip to content
Back to skills

Choose Storage

ASecurity

Decide storage layer for an Expo app: expo-sqlite + drizzle vs MMKV vs SecureStore vs AsyncStorage vs Zustand persist. Use when the user says 'storage', 'database', 'where to save data', 'AsyncStorage vs MMKV', 'expo-sqlite'.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 4, 2026
developmentbashsqlreactapidatabase

Works with

  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 2 files and shows the line behind each finding

Scanned October 4, 2026

npx -y skills add khadinakbarlabs/expo-mobile-app-builder --skill choose-storage --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Choose Storage?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Choose Storage
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/khadinakbarlabs-choose-storage/badge)](https://www.skillsdirectory.com/skills/khadinakbarlabs-choose-storage)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "choose-storage"
description: "Decide storage layer for an Expo app: expo-sqlite + drizzle vs MMKV vs SecureStore vs AsyncStorage vs Zustand persist. Use when the user says 'storage', 'database', 'where to save data', 'AsyncStorage vs MMKV', 'expo-sqlite'."
---

# Choose Storage

Pick the right Expo storage primitive.

## Decision tree
- **Tokens, passwords, API keys** → expo-secure-store (Keychain on iOS)
- **Tiny preferences (<10 keys)** → AsyncStorage or Zustand persist
- **Fast key/value (>10 keys, frequent reads)** → MMKV (`react-native-mmkv`)
- **Structured data, complex queries** → expo-sqlite + drizzle-orm
- **Large blobs / images** → expo-file-system
- **Cross-device sync** → CloudKit private DB (requires native bridge or expo-cloud-storage if available)

## expo-secure-store
```ts
import * as SecureStore from 'expo-secure-store';
await SecureStore.setItemAsync('authToken', token);
const token = await SecureStore.getItemAsync('authToken');
```

## MMKV
```bash
npm install react-native-mmkv
```
```ts
import { MMKV } from 'react-native-mmkv';
export const storage = new MMKV();
storage.set('user.id', '123');
const id = storage.getString('user.id');
```
~30x faster than AsyncStorage. Sync API.

## expo-sqlite + drizzle
```bash
npm exec --no -- expo install expo-sqlite
npm install drizzle-orm
npm install -D drizzle-kit
```
```ts
import { drizzle } from 'drizzle-orm/expo-sqlite';
import * as SQLite from 'expo-sqlite';

const sqlite = SQLite.openDatabaseSync('app.db');
export const db = drizzle(sqlite);
```

## ABSOLUTE NO
- Never store auth tokens in AsyncStorage or MMKV (no encryption at rest)
- Never put images in expo-sqlite (use expo-file-system)
- Don't pick CoreData via native bridge unless you specifically need NSPersistentCloudKitContainer features

Files in this skill

  • SKILL.md1.8 KB
  • agents/openai.yaml173 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…