redux-persist-transform-filter icon indicating copy to clipboard operation
redux-persist-transform-filter copied to clipboard

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

Open c0d3x opened this issue 5 years ago • 0 comments

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]
};

c0d3x avatar Mar 17 '20 17:03 c0d3x