Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

redux-persist-transform-expire

gabceb13.9kMIT0.0.2

Add expiration to your persisted store

redux, redux-persist, redux-persist-transform, expire

readme

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