Created
April 26, 2019 08:11
-
-
Save asherccohen/ff8b548926811cfe62c9268c69299775 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rootReducer = (state, action) => { | |
if (action.type === USER_LOGGED_OUT) { | |
// for all keys defined in your persistConfig(s) | |
storage.removeItem('persist:root') | |
// storage.removeItem('persist:otherKey') | |
state = undefined; | |
} | |
return appReducer(state, action); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment