A persistent key-value storage library for Expo and React Native apps that removes the size limitations of react-native AsyncStorage by using expo-file-system. Version 55.0.5 requires Expo SDK 54+, React 19+, and expo-file-system 19+. The library provides a simple, Promise-based API with TypeScript support, automatic JSON serialization for non-string values, and built-in security features like key validation and path traversal prevention. It stores data in the app's private document directory, ensuring persistence across restarts without size constraints.
npm install expo-storageNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic CRUD operations: store, retrieve, list keys, and delete data using the object-parameter API.
Use { key: 'k', value: 'v' } instead of ('k', 'v') for setItem, getItem, removeItem.Update expo-file-system to ^19.0.0 and ensure Expo SDK >= 54.
Validate keys with /^[a-zA-Z0-9_.-]+$/ before storing.
Call JSON.parse on the result of getItem if you stored a non-string value.
Use import { Storage } from 'expo-storage' instead of import Storage from 'expo-storage'.Change to: import { Storage } from 'expo-storage'Run: expo install expo-file-system or ensure version ^19.0.0 is installed.
Use only alphanumeric, hyphen, underscore, and dot characters. Avoid '../' or '/'. Example: 'user-preferences'
Wrap in object: { key: 'k', value: 42 } instead of Storage.setItem({ key: 'k', value: 42 }) is actually correct. If error persists, check value is not undefined.