Dav*_*ing 5 state nested blacklist redux-persist
所以我有一个凭证对象,其中包含密码和用户名
payload: Object
credentials: Object
password: ""
username: ""
Run Code Online (Sandbox Code Playgroud)
我想在减速器配置中将密码列入黑名单,例如
const authPersistConfig = {
key: 'AuthReducer',
storage: storage,
blacklist: ['credentials.password']
};
Run Code Online (Sandbox Code Playgroud)
如果使用此代码,则两个凭据状态最终都会被列入黑名单。我要保留用户名而不是密码。
可能redux-persist仅保留顶级状态,或者可能是语法错误,或者完全是其他原因-有什么想法吗?
非常感谢