irychen / keepalive-for-react

React KeepAlive is a component that can cache the state of the component and reuse it when needed.
MIT License
162 stars 32 forks source link

aliveRef.current?.getCaches()获取存在延迟 #11

Closed jinxiangqiang closed 3 months ago

jinxiangqiang commented 3 months ago

我需要获取缓存的数组生成tabs,但是直接获取会存在获取不及时的问题

irychen commented 3 months ago

可以在外部管理tabs,不需要通过aliveRef.current?.getCaches()获取缓存节点

可以参考

jinxiangqiang commented 3 months ago

好的