Skip to content

Storage Plugin

The Storage plugin is a single DevTools panel for MMKV, AsyncStorage, Expo SecureStore, and react-native-keychain. Register whichever adapters your app uses and inspect them all from one place.

Make sure to go through the Getting Started guide before installing the plugin.

npm install -D @rozenite/storage-plugin

Install the peer dependencies for the storages you use:

npm install react-native-mmkv @react-native-async-storage/async-storage expo-secure-store react-native-keychain
App.tsx
import {
createAsyncStorageAdapter,
createExpoSecureStorageAdapter,
createKeychainStorageAdapter,
createMMKVStorageAdapter,
useRozeniteStoragePlugin,
} from '@rozenite/storage-plugin';
const storages = [
createMMKVStorageAdapter({
storages: { user: userStorage, cache: cacheStorage },
}),
createAsyncStorageAdapter({
storage: AsyncStorage,
}),
createExpoSecureStorageAdapter({
storage: SecureStore,
keys: ['token', 'session'],
}),
createKeychainStorageAdapter({
keychain: Keychain,
}),
];
function App() {
useRozeniteStoragePlugin({ storages });
return <YourApp />;
}

With Rozenite for Web, this plugin is also available when debugging your React Native web app — showing entries from whichever Async Storage / Expo Secure Store adapters you configure for the browser.

App.tsx
createMMKVStorageAdapter({
storages: { 'user-storage': userStorage, 'settings-storage': settingsStorage },
blacklist: { 'user-storage': /token|secret|password/ },
});

MMKV v4 arrays aren’t supported — pass a record ({ id: instance }) instead.

App.tsx
// v2 style
createAsyncStorageAdapter({ storage: AsyncStorage });
// v3 style (instance-based)
createAsyncStorageAdapter({
storages: {
auth: authStorageInstance,
cache: { storage: cacheStorageInstance, name: 'Cache Instance', blacklist: /debug|temp/ },
},
});
App.tsx
createExpoSecureStorageAdapter({
storage: SecureStore,
keys: async () => ['token', 'session', 'refreshToken'],
storageName: 'Auth Secure Storage',
});

SecureStore doesn’t support key enumeration, so you provide known keys via keys.

App.tsx
import * as Keychain from 'react-native-keychain';
createKeychainStorageAdapter({
keychain: Keychain,
storageName: 'Credentials',
readOnly: true,
});

Each entry is one Keychain (iOS) or Keystore (Android) service, and its value is the stored password. By default every service reported by getAllGenericPasswordServices is listed, which can include services written by other libraries in your app. Pass services (a list or an async function) to limit it. Purging the storage removes every listed service except the ones hidden by blacklist.

On iOS, services that need Face ID, Touch ID or a passcode are skipped when listing, so the panel doesn’t trigger authentication prompts. Set skipUIAuth: false to list them anyway. Entries that can’t be read, for example after a biometric change invalidates their Keystore key, are left out of the table with a warning in the app’s console instead of failing the whole list. They still count towards the storage’s entry count, and purging removes them.

Editing an entry keeps its existing username and, on Android, its storage type unless setOptions sets storage. New entries, and entries that can’t be read, use defaultUsername. setOptions is forwarded to setGenericPassword (for example accessible or accessControl). The keychain doesn’t report these options for stored entries, so if your entries use different ones, pass a function that returns the options for each service:

createKeychainStorageAdapter({
keychain: Keychain,
setOptions: (service) =>
service === 'auth-token'
? { accessControl: Keychain.ACCESS_CONTROL.BIOMETRY_CURRENT_SET }
: undefined,
});

Set readOnly to disable adding, editing, deleting, purging and importing in the panel.

If keychain is undefined, for example because you load the library optionally, the adapter exposes no storages instead of throwing.

MMKV storages that hold binary values render and edit them through a hex viewer with a Base64 mode for copy/paste. AsyncStorage, Expo SecureStore, and react-native-keychain don’t support binary values.

blacklist is configured per storage and matched against the key in that storage:

App.tsx
createAsyncStorageAdapter({
storages: {
cache: { storage: cacheStorageInstance, blacklist: /temp|debug|internal/ },
},
});

The panel loads entries in bounded, key-sorted pages with value previews only — it doesn’t read your whole storage up front. Search runs on the device before pagination. Open an entry to load its full value; closing it, switching storage, or refreshing discards that loaded value again.

Storages with native subscriptions (like MMKV) update live. Others don’t poll — use Refresh to pick up external changes.

Export the currently selected storage to a JSON snapshot, and import one back — handy for reproducing a bug from a captured state or sharing a scenario with a teammate.

  • Import and export always target the currently selected storage — switch the dropdown first to target a different one.
  • Import is an upsert: existing keys are overwritten, missing keys are created, keys not in the file are left alone. There’s no “replace all”.
  • The file is validated before anything is written. If validation fails, nothing changes.
  • Keys matching the target storage’s blacklist are skipped, and the preview shows you which ones before you apply.

Exports are versioned (version: 1 today); a mismatched version is rejected rather than silently coerced.

Next: See Network Activity and Plugin Development.