redux-persist-transform-expire

0.0.2 • Public • Published

redux-persist-transform-expire

npm

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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.22,506latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.22,506
0.0.10

Package Sidebar

Install

npm i redux-persist-transform-expire

Weekly Downloads

2,506

Version

0.0.2

License

MIT

Last publish

Collaborators

  • gabceb