App uses AsyncStorage/MMKV or equivalent for local persistence
Why it matters
Without a local persistence library, your app stores all data in memory — which evaporates the moment the OS terminates the process. Users lose cart contents, form drafts, or session state on every background cycle. On mobile, the OS kills backgrounded apps aggressively; an app with zero local storage is effectively stateless. ISO 25010:2011 reliability.recoverability scores zero when there is nothing to recover. Beyond UX frustration, this is an architectural gap: offline-first patterns, crash recovery, and conflict resolution all presuppose that at least one store/retrieve call site exists.
Severity rationale
Critical because a total absence of local persistence means every app restart silently destroys user data with no recovery path.
Remediation
Add AsyncStorage as your baseline persistence layer, or MMKV when performance matters. Install the library, then wire at least two distinct store/retrieve call sites — one for writes, one for reads — before marking this resolved.
// npm install @react-native-async-storage/async-storage
import AsyncStorage from '@react-native-async-storage/async-storage';
export const save = async (key: string, value: unknown) => {
await AsyncStorage.setItem(key, JSON.stringify(value));
};
export const load = async <T>(key: string): Promise<T | null> => {
const raw = await AsyncStorage.getItem(key);
return raw ? (JSON.parse(raw) as T) : null;
};
For high-throughput writes, swap in MMKV: npm install react-native-mmkv, then new MMKVLoader().initialize(). Keep sensitive data out of both — use expo-secure-store or Keychain for tokens (see encryption-at-rest).
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Mobile Offline & Storage Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- iso-25010:2011 · reliability.recoverability — Recoverability
Taxons
History
- 2026-04-18·v1.0.0·Initial import from mobile-offline-storage·automated