react-activation
react-activation copied to clipboard
Hack <KeepAlive /> for React
第一个tab无法缓存,每次切换到第一个tab都会刷新数据这是为什么? 
`import` { KeepAliveContainer } from '@/components/KeepAliveWrapper'; import { Outlet, useLocation } from '@umijs/max'; import { FC } from 'react'; const KeepAliveWrapper: FC = () => { const location = useLocation();...
新建一个项目单纯引入此库使用会报错无法找到 `prop-types`,排查发现是 `create-react-context` 使用并列为了 peerDependencies。 一个库最好将所有子依赖项的 peer 都列举出来避免这个问题 
当输出这样时 会报错 [vite] Internal server error: Parse error @:122:97 Plugin: plugin-import-redirect
我从项目入口分了两个版本出来,第一个版本没有缓存,第二个版本加入keeper,其他并内有什么区别,再加入keepalive后发现中文设置失效了,有没有大佬有过类似的问题,求教~
autoFreeze 在执行过内部 safeSetState({ freeze: true }) 之后,Antd 的 configProvider theme 变化不再被缓存组件内部监听。已经尝试了 autoFixContext,还是不行。 关闭 autoFreeze 或者 Keeper 内部 freeze state 没有变成 true 之前运行正常
使用 react-activation 来对 antd 中的 tabs 组件进行缓存,当 TabPane 中组件内容过多时,缓存会失效。当 TabPane 中组件内容不多时,缓存是正常的,并且滚动条位置也能保存下来。 ```ts {panes.length > 0 && panes.map((pane: any) => ( {pane.content} ))} ... ```
发现回到缓存页面,useRef().current为null
# antd Tooltip 切换页面不会自动消失 如图  最小复现Demo: https://codesandbox.io/s/keen-mirzakhani-te12o4?file=/src/index.js  当切换页面的按钮上有Tooltip时,Tooltip不会自动消失,需要返回前一个页面把鼠标移到对应按钮上重新触发才可以。 尝试过 切换页面后获取dom元素设置display: none; 更改className等方法,会影响之后的tooltip效果 想问下有没有什么办法能比较好的全局销毁 Tooltip 又不会影响后面再需要显示的效果 或者react-activation有没有可能解决这个问题呢?