react-activation icon indicating copy to clipboard operation
react-activation copied to clipboard

首次切换回缓存页面数据为空

Open jinlllllll opened this issue 2 years ago • 1 comments

大佬们,我这个每次首次切换回缓存页面都没数据,需要重新触发请求才有数据,并且清除缓存后再点开页面会有上一次的搜索数据缓存,有人知道怎么回事吗。。。 image

jinlllllll avatar Jun 07 '23 08:06 jinlllllll

KeepAlive 只能确保你的组件不被卸载,如果组件内应用了统一的数据源,例如 redux,而你是通过修改 redux 来调整数据的话,KeepAlive 对这部分数据是无效的,需要确保你的数据只由组件内部生成

CJY0208 avatar Jul 06 '23 03:07 CJY0208