redux-persist-transform-expire
v0.0.2
Published
Add expiration to your persisted store
Downloads
11,243
Maintainers
Readme
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 |