🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

redux-persist-except-ings

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-persist-except-ings

Ignore event states that contains "ing", avoids stalemate occured by app restarting during events

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

Redux Persist - Except "ing"s npm version

Ignore event states that contains "ing", avoids stalemate occured by app restarting during events (something like { profileRefreshing: true }).

Using this transform will prevent persisting (neither save or restore) all states with the ing keyword in it's name.

For example,

{
  profile: {
    name: "Pokai Chang",
    updatedAt: "2015-12-19T16:20:40.575Z",
    updating: true
  }
}

will become:

{
  profile: {
    name: "Pokai Chang",
    updatedAt: "2015-12-19T16:20:40.575Z"
  }
}

Install

npm install redux-persist-except-ings --save

Usage

import { compose } from 'redux';
import { persistStore, autoRehydrate } from 'redux-persist';
import reduxPersistExpectIngs from 'redux-persist-except-ings';

const reducer = combineReducers(reducers);
const store = compose(autoRehydrate(), createStore)(reducer);

persistStore(store, { transforms: [reduxPersistExpectIngs] });

FAQs

Package last updated on 19 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts