0.0.2 • Published 9 years ago
redux-persist-transform-expire v0.0.2
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 |