Storage adaptor for using Google Chrome's Storage API with redux-persist, version 2.1.9. Enables persisting Redux state in Chrome extensions using sync, local, or managed storage. Released in 2024, it is a focused utility with peer dependency on redux-persist >=5.0. Requires Node.js >=22. Key differentiator: specifically designed for Chrome extension environments, wrapping the chrome.storage API to integrate seamlessly with redux-persist's persistence workflow.
npm install redux-persist-chrome-storageNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Setup redux-persist with Chrome sync storage in a Chrome extension. Shows creation of storage adaptor, persist config, and store creation.
Use chrome.storage directly in service workers: import { chrome } from 'webextension-polyfill' or use chrome.runtime.getBackgroundPage() in popup scripts.No migration needed if using default import; check TypeScript type imports.
Test thoroughly in target browsers or consider browser-agnostic alternatives like localForage.
Always use one of these three strings; check chrome.storage documentation for capacity limits.
Ensure code runs only in Chrome extension context; use webextension-polyfill for cross-browser support.
Run npm install redux-persist-chrome-storage or yarn add redux-persist-chrome-storage.
Ensure first argument is window.chrome (or chrome in background scripts) and second is 'sync', 'local', or 'managed'.