react-native-ultrastore
v2.0.2
Published
Ultra fast storage + state manager for React Native with MMKV v4, Nitro Modules, Atoms, and Zustand support.
Maintainers
Readme
🚀 UltraStore v2.0.0
The fastest, most modern storage + state management library for React Native in 2026. Built on MMKV v4 and Nitro Modules for near-zero bridge overhead.
[!IMPORTANT] React Native 0.75+ required. This library uses MMKV v4 which is a Nitro Module.
✨ Features (2026 Edition)
- ⚡ Blazing Fast: 10–30x faster than AsyncStorage, powered by MMKV v4 + Nitro JSI.
- 🏗️ New Architecture First: Full support for Fabric and TurboModules with zero bridge overhead.
- ⚛️ Atom API: Jotai-style atomic state for composable, isolated state units.
- 📦 Zustand Adapter: Use UltraStore as a persistence layer for Zustand in one line.
- 🛠️ DevTools: Built-in middleware to inspect live state in Metro/Flipper.
- 🔄 Batch Updates: Write multiple keys in a single operation with zero redundant renders.
- 🌐 Web Support: Seamless fallback to
localStoragefor Expo Web. - 🧪 Expo Go Fallback: Graceful in-memory fallback for Expo Go environments.
- 🔐 Military-Grade Encryption: Secure your data with MMKV's native encryption.
🚀 Quick Start
npm install react-native-ultrastore react-native-mmkv react-native-nitro-modules1. Basic Hook
import { useUltraStore } from 'react-native-ultrastore';
const [user, setUser] = useUltraStore('user_profile', { name: 'Samad' });2. Atomic State (New!)
import { createAtom, useUltraAtom } from 'react-native-ultrastore';
const themeAtom = createAtom('app_theme', 'dark');
function Component() {
const [theme, setTheme] = useUltraAtom(themeAtom);
}3. Zustand Integration (New!)
import { createUltraZustandStorage } from 'react-native-ultrastore/zustand';
const useStore = create(
persist(
(set) => ({ ... }),
{
name: 'my-storage',
storage: createJSONStorage(() => createUltraZustandStorage()),
}
)
);📊 Benchmarks (2026)
| Operation | AsyncStorage | MMKV v2 | UltraStore v2 (Nitro) | | :--- | :--- | :--- | :--- | | Write (1KB) | ~5.2ms | ~0.15ms | ~0.04ms | | Read (1KB) | ~3.8ms | ~0.08ms | ~0.02ms | | Bridge Overhead | High (JSON) | Low (JSI) | Zero (Nitro C++) |
🛠️ DevTools Middleware
Enable the built-in DevTools to see your state changes in real-time.
import { defaultStorage, createDevToolsMiddleware } from 'react-native-ultrastore';
if (__DEV__) {
defaultStorage.use(createDevToolsMiddleware());
}In Dev mode, access your state via global.__ULTRASTORE_STATE__ in the Metro console.
🔄 Batch Updates
import { batchSet } from 'react-native-ultrastore';
batchSet({
'is_logged_in': true,
'last_login': Date.now(),
'session_count': 5
}); // Only one set of notifications triggered!🗺️ Comparison
| Feature | UltraStore | AsyncStorage | Zustand | Jotai | | :--- | :--- | :--- | :--- | :--- | | Persistence | ✅ (Built-in) | ✅ | ⚠️ (Manual) | ⚠️ (Manual) | | Speed | 🚀 (Nitro) | 🐢 (Bridge) | ✅ | ✅ | | Atoms | ✅ | ❌ | ❌ | ✅ | | Encryption | ✅ | ❌ | ❌ | ❌ | | Web/Expo Go | ✅ | ✅ | ✅ | ✅ |
🛤️ Migration Guide (v1 -> v2)
UltraStore v2.0.0 is a major upgrade with some breaking changes due to MMKV v4.
- Peer Dependencies: Ensure you have
react-native-mmkv@>=4.0.0andreact-native-nitro-modules. - Native Code: If you were using
StorageEngine.delete(), it now callsremove()internally to match MMKV v4. The API remains backward compatible. - New Architecture: No code changes required! UltraStore v2 is bridge-free by default.
License
MIT © Samad Khan
