redux-persist-transform-expire
0.0.2 • Public • Published redux-persist-transform-expire
Add expiration to your persisted store.
Usage
import createExpirationTransform from 'redux-persist-transform-expire';
const expireTransform = createExpirationTransform({
expireKey: 'customExpiresAt',
defaultState: {
custom: 'values'
}
});
persistStore(store, {
transforms: [expireTransform]
});
Configuration
Attr |
Type |
Default |
Notes |
expireKey |
String |
'persistExpiresAt' |
Name of the attribute holding the expire date value |
defaultState |
Any |
{} |
Shape of the state after expirations happen |
Package Sidebar
Install
npm i redux-persist-transform-expire
Weekly Downloads