edy / redux-persist-transform-filter

Filter transformator for redux-persist
MIT License
190 stars 21 forks source link

Persist only one reducer with sub elements everything else is blacklisted, how? #29

Open c0d3x opened 4 years ago

c0d3x commented 4 years ago

How to persist only 1 reducer with couple of keys everything else in that reducer is blacklisted? My 10+ other reducers should also be blacklisted by default, I dont want to have to define each of them manually.

My config:

const persistMyReducer = persistFilter('myReducer', ['myReducerObject1', 'myReducerObject2'], 'whitelist');

const persistConfig = {
    key: 'root',
    storage,
    transforms: [persistMyReducer]
};