Transformer for redux-persist to add expiration to persisted reducer state. Current stable version 1.1.1, no recent releases. Allows setting expiry per reducer key with auto-expire, custom key for timestamp, and fallback state. Simple API compared to alternatives like redux-persist-immutable or custom middleware. Ships TypeScript types. Lightweight, no extra dependencies.
npm install redux-persist-expireNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create an expiring transform for a reducer key using redux-persist.
Use default import: import expireReducer from 'redux-persist-expire' or const expireReducer = require('redux-persist-expire').Either set `persistedAtKey` in your reducer or set `autoExpire: true`.
Provide the initial state of the reducer as `expiredState`.
Use redux-persist v4 or v6.
Set `autoExpire: true` to expire on subsequent rehydrations.
Change to: import expireReducer from 'redux-persist-expire'
Use: const expireReducer = require('redux-persist-expire')Ensure your reducer sets the timestamp key (default '__persisted_at') or set autoExpire: true.
No dependency data recorded yet.