Skip to main content

Get started with expo-native-storage

expo-native-storage provides lightning-fast native storage for Expo applications. It leverages platform-native storage APIs (UserDefaults on iOS, SharedPreferences on Android) to deliver superior performance compared to traditional storage solutions.

Key features

Lightning fast

Direct native storage with no bridge delays. Up to 15x faster than AsyncStorage on Android.

Incredibly lightweight

19x smaller bundle size (19.6KB vs 381KB) compared to AsyncStorage.

Native performance

Uses UserDefaults on iOS and SharedPreferences on Android for optimal performance.

Scales effortlessly

Performance improves with usage thanks to in-memory caching on Android.

Quick example

Get started with expo-native-storage in seconds:
import Storage from 'expo-native-storage';

// Store strings
await Storage.setItem('username', 'john_doe');
const username = await Storage.getItem('username'); // 'john_doe'

// Store objects
await Storage.setObject('user', { 
  name: 'John', 
  age: 30,
  premium: true 
});
const user = await Storage.getObject('user');

// Use synchronous methods for immediate access
Storage.setItemSync('theme', 'dark');
const theme = Storage.getItemSync('theme'); // 'dark'

Next steps

Installation

Install expo-native-storage and set up your development environment.

Quickstart

Build your first app with expo-native-storage in minutes.

API Reference

Explore all available methods and their signatures.

Migration Guide

Migrate from AsyncStorage with zero breaking changes.

Build docs developers (and LLMs) love