简体   繁体   中英

Redux store does not clear on refresh

We are using redux persist. I am wondering, how do I clear some part of the state on refresh ?

The point of redux-persist is pretty much that the store does not clear on refresh.

If you only want to persist parts of the store, either only persist some reducers, not your root reducer - or use the whitelist and blacklist features to define what exactly should be persisted.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM