Registry /
storage / redux-storage-engine-reactnativeasyncstorage
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
createEngine
✓ import createEngine from 'redux-storage-engine-reactnativeasyncstorage';
✗ const createEngine = require('redux-storage-engine-reactnativeasyncstorage');
Package uses default export; CommonJS require works but TypeScript with esModuleInterop may need default import.
engine
✓ const engine = createEngine('my-key');
The engine instance is used with redux-storage middleware; no named exports.
createEngine (TypeScript)
✓ import createEngine from 'redux-storage-engine-reactnativeasyncstorage';
✗ import { createEngine } from 'redux-storage-engine-reactnativeasyncstorage';
Common mistake: trying named import. Package has no type definitions; use @types/react-native if needed.
Creates a Redux store with redux-storage middleware using AsyncStorage engine.
import { createStore, applyMiddleware } from 'redux';
import { createMiddleware } from 'redux-storage';
import createEngine from 'redux-storage-engine-reactnativeasyncstorage';
import reducer from './reducer';
const engine = createEngine('my-app-key');
const storageMiddleware = createMiddleware(engine);
const store = createStore(reducer, applyMiddleware(storageMiddleware));
export default store;
Debug
Known issues
deprecatedThe original package redux-storage-engine-reactnativeasyncstorage is deprecated. Use this fork instead.fixUpgrade to version 1.0.7, maintained by react-stack.
affects: <=1.0.6
gotchaAsyncStorage may be removed in future React Native versions. New projects should use @react-native-async-storage/async-storage.fixInstall @react-native-async-storage/async-storage and link; or switch to a different engine.
affects: >=0.60
breakingredux-storage v4+ changed the middleware API. This engine is designed for redux-storage v3 API.fixUse redux-storage v3.x with this engine, or consider migrating to redux-persist.
affects: >=4.0.0 of redux-storage
deprecatedredux-storage itself is largely unmaintained; prefer redux-persist for new projects.fixEvaluate redux-persist as a modern alternative.
affects: *
gotchaEngine key must be unique per store; otherwise state may collide with other apps using the same key.fixUse a unique key, e.g., 'my-app-state'.
affects: *
Errors
Common errors & fixes
AsyncStorage is not defined
AsyncStorage not linked or import missing in React Native.
fixEnsure AsyncStorage is available: import { AsyncStorage } from 'react-native'; or install @react-native-async-storage/async-storage. TypeError: _redux_storage_engine_reactnativeasyncstorage.default is not a function
Using named import instead of default import.
fixUse: import createEngine from 'redux-storage-engine-reactnativeasyncstorage';
Module not found: Can't resolve 'redux-storage'
redux-storage not installed as a peer dependency.
fixRun: npm install redux-storage
Invalid hook call. Hooks can only be called inside of the body of a function component.
Mistakenly using this engine with React hooks; this is not a React hook library.
fixUse this engine only with redux-storage middleware, not as a hook.
Audit
Dependencies
redux-storagerequiredpeer dependency; this engine is meant to be used with redux-storage
react-nativerequiredprovides AsyncStorage API; required at runtime