Example code, blacklisted the auth for rootPersistConfig , and for the authPersistConfig, not updating on storage from rootReducer, my goal here is auth from combineReducers will be stored on another storage but the state on storage is not updating, only rootReducer is updating
import { combineReducers } from 'redux'
import { persistReducer } from 'redux-persist'
import storage from 'redux-persist/lib/storage'
import { authReducer, otherReducer } from './reducers'
Example code, blacklisted the auth for rootPersistConfig , and for the authPersistConfig, not updating on storage from rootReducer, my goal here is auth from combineReducers will be stored on another storage but the state on storage is not updating, only rootReducer is updating
import { combineReducers } from 'redux' import { persistReducer } from 'redux-persist' import storage from 'redux-persist/lib/storage'
import { authReducer, otherReducer } from './reducers'
const rootPersistConfig = { key: 'root', storage: storage, blacklist: ['auth'] }
const authPersistConfig = { key: 'auth', storage: storage, blacklist: ['somethingTemporary'] }
const rootReducer = combineReducers({ auth: persistReducer(authPersistConfig, authReducer), other: otherReducer, })
export default persistReducer(rootPersistConfig, rootReducer)