redux-persist: Problem with PersistStore whitelist
Hi, I was trying to make only one reducer persist like in my code below:
persistStore(store, {whitelist: ['login']});
But all my reducers keep persisting,how I am suppose to make the whitelist to work? Thank you in advance!
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 22 (3 by maintainers)
2019, and still got this issue… too
2019, and still got this issue… any solutions here?
I am also having this issue:
is my reducer, combined into my rootReducer using
Despite the white/black list nested configs, the entire state is persisted from all reducers, as I can see by inspecting action.payload in my ‘persist/REHYDRATE’ state listener.
Am I using this correctly?
maybe 2021 still got this issue… too
@dchersey , I am trying to do something similar with having a combination of whitelist and blacklist to cherry pick what I want to persist in redux. Have you managed to solve this? Any leads for me (and anyone who land up here).
I’m following the docs in the Migration guide that say to
This is inconsistent with the info in the README under nested persists … but it seemed pretty clear and I thought it would supercede it. But that is confusing … maybe it should go back to
combineReducers?Zack, thank you very much for your help! persistStore(store, { storage: AsyncStorage, whitelist: [‘something’] });
Errors:
redux-persist: invalid option passed to persistStore: “whitelist”. You may be incorrectly passing persistConfig into persistStore, whereas it should be passed into persistReducer.
redux-persist: invalid option passed to persistStore: “storage”. You may be incorrectly passing persistConfig into persistStore, whereas it should be passed into persistReducer.
@rt2zz - Sorry, it’s my bad! I’ve just fixed it. I haven’t noticed that combineReducers was replaced with persistCombineReducers.