I have set up login in my react app rootReducer.js in the following way:-
const persistConfig = {
key: 'parkytAdmin',
storage: storage,
whitelist : ['users']
}
const authPersistConfig = {
key: 'user',
storage:storageSession
}; // This is to session storage
const rootReducer = combineReducers({
// other reducers //
users : persistReducer(authPersistConfig,userReducer),
});
export default persistReducer(persistConfig, rootReducer);
Now I want to log out. How can I do that?