redux-persist-capacitor-storage
v1.0.8
Published
Redux persist storage adapter for capacitor filesystem storage across all devices
Downloads
339
Maintainers
Readme
Redux Persist Capacitor Filesystem Storage
Redux Persist storage engine working as an adapter to Capacitor's Filesystem API
Install
yarn add @capacitor/core redux-persist-capacitor-storage
Simple use-case with auth state
import CapacitorStore from "redux-persist-capacitor-storage";
import { persistReducer } from "redux-persist";
import { auth } from "./auth";
const authPersistConfig = {
key: "auth",
storage: CapacitorStore
};
const appReducer = combineReducers({
auth: persistReducer(authPersistConfig, auth)
});