redux-persist-transform-filter
Filter transformator for redux-persist
Installation
npm install redux-persist-transform-filter
Usage
import createFilter from 'redux-persist-transform-filter';
const saveSubsetFilter = createFilter(
'myReducerOne',
['keyYouWantToSave1', 'keyYouWantToSave2']
);
const loadSubsetFilter = createFilter(
'myReducerTwo',
null,
['keyYouWantToLoad1', 'keyYouWantToLoad2']
);
const saveAndloadSubsetFilter = createFilter(
'myReducerThree',
['one', 'two']
['three', 'four']
);
persistStore(store, {
transforms: [
saveSubsetFilter,
loadSubsetFilter,
saveAndloadSubsetFilter,
]
});