Closed sqchenxiyuan closed 2 years ago
我是从umi-hooks迁移过来出现了这个问题...
Hello:
这个问题我们已经在 v3.0 版本彻底修复,目前 v3.0 版本已经发布 alpha 版本。
欢迎试用。
文档:https://ahooks-next.surge.sh/ 源码:https://github.com/alibaba/hooks/tree/next
安装最新分支
$ npm install --save ahooks@next
# or
$ yarn add ahooks@next
We have fixed this problem in the v3.0 version, and the alpha has been released.
Welcome to try.
Doc:https://ahooks-next.surge.sh/ Source Code:https://github.com/alibaba/hooks/tree/next
Install v3.0
$ npm install --save ahooks@next
# or
$ yarn add ahooks@next
初次渲染useInViewport获取的ref没有绑定对应的dom,后续绑定都无效
https://codesandbox.io/s/eloquent-tdd-ldp7l?fontsize=14&hidenavigation=1&theme=dark
也许可以通过如下方式来检测变化