Open samitha9125 opened 1 year ago
Hi @samitha9125 it's possible but not with getPersistConfig method. This method is actually a helper to create a configuration for you but behind the scenes, it uses createWhitelist and createBlacklist transforms which can be used together with caution. getPersistConfig prevents incorrect config, using transforms directly you must know what you're doing. I'm away from my desk and getting back next week. I'll give you an example when I'm back unless you figure this out yourself. As you can see I already use blacklist and whitelist at the same time here:
https://github.com/PiotrKujawa/redux-deep-persist/blob/master/src/index.ts#L221. https://github.com/PiotrKujawa/redux-deep-persist/blob/master/tests/persist.spec.ts#L32
@PiotrKujawa Thank you for the reply. This library is really convenient and I think we can find a solution to add this feature as well, if you are up to discussions :)
First of all, thank you for the amazing library and keep up the good work!
Background
We want to use another storage for secure storing. But with current configurations mentioned in the redux-persist Nested Persist section and redux-deep-persist configurations like below, details will not get stored.
Expected
Since
secured
is blacklisted in theconfig
, it should be able to persist some configurations from thegeneral
reducer as well.Actual
Getting this error (
You should not define a whitelist and blacklist in parallel.
) which is clearly mentioned in the documentation. But what would be the alternative?