redux-storage-decorator-immutable-filter
v1.0.1
Published
A better filter decorator to use with redux-storage (if your state is an immutable Map)
Downloads
576
Maintainers
Readme
[redux-storage-decorator-immutable-filter][]
Filter decorator for redux-storage to only store a subset of the whole state tree. Especially useful if your state tree is an immutable Map.
Installation
npm install --save redux-storage-decorator-immutable-filter
Usage
Simply wrap your engine in this decorator, whitelist all keys that should be passed through and blacklist the keys that shouldn't.
import filter from 'redux-storage-decorator-immutable-filter'
engine = filter(engine, [
'whitelisted-key',
['nested', 'key'],
['another', 'very', 'nested', 'key']
], [
'backlisted-key',
['nested', 'blacklisted-key']
]);