CJY0208 / react-router-cache-route

Route with cache for react-router V5 like <keep-alive /> in Vue
https://www.npmjs.com/package/react-router-cache-route
MIT License
1.16k stars 113 forks source link

切换路由时原页面与悬浮相关的内容都会重新悬浮一遍 #169

Closed NOBOUNDer closed 6 months ago

NOBOUNDer commented 7 months ago

react: 18.2.0 antd: 5.10.1 react-router-cache-route: 1.12.11

复现情况请看附件,感谢🙏

https://github.com/CJY0208/react-router-cache-route/assets/43603415/756f060f-0da0-4f8a-9deb-781624564197

CJY0208 commented 6 months ago

v1.13.0 版本增加了 autoFreeze 属性,关闭内部的 freeze 优化逻辑,可以解决当前问题

<CacheRoute autoFreeze={false} ... />
<CacheSwitch autoFreeze={false} ... />

相关原因解释:https://github.com/CJY0208/react-activation/issues/225#issuecomment-1311136388