Closed helgefredheim closed 8 years ago
I struggle making whitelist and blacklist working.
I understand the arrays passed to storage.createEngine should be objects with a type attribute. However, when I pass this like so:
const middleware = storage.createMiddleware(engine, [], [{type: "MY_ONLY_ACTION_TO_BE_SAVED"}]
nothing happens when I dispatch an action with that type.
If I don't pass anything, it saves the full state tree to the key I've provided to the engine I'm using. I currently use redux-storage-engine-localstorage.
Any idea why?
Yes, you to decorate the engine with redux-storage-decorator-filter for black- and/or whitelisting 😄
I struggle making whitelist and blacklist working.
I understand the arrays passed to storage.createEngine should be objects with a type attribute. However, when I pass this like so:
const middleware = storage.createMiddleware(engine, [], [{type: "MY_ONLY_ACTION_TO_BE_SAVED"}]
nothing happens when I dispatch an action with that type.
If I don't pass anything, it saves the full state tree to the key I've provided to the engine I'm using. I currently use redux-storage-engine-localstorage.
Any idea why?