-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
useInfiniteScroll在切换tab场景下执行两次的问题 #1652
Comments
麻烦放一个 demo 呢 |
Hello @taoliujun. Please provide a online reproduction by forking this link https://codesandbox.io/s/ok2fe or a minimal GitHub repository. Issues labeled by 你好 @taoliujun, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 此处 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。3 天内未跟进此 issue 将会被自动关闭。 |
+1 遇到了,就没人管么,类似问题的pr都被close了 |
麻烦放一个在线 能复现的 demo。 |
但我这是为了复现而故意为之的: 不知道真实用户会不会这样用,按理来说应该直接用 useInfiniteScroll 返回的 data 数据渲染 UI 的。 |
@taoliujun @soulcm 可以给个你们的在线 demo 吗? |
有一个业务场景是tab切换后请求接口,所以在useInfiniteScroll中设置了
reloadDeps
。造成一个问题如下:打断点发现,是scroll监听事件执行的时候,finalData和noMore仍然是上一个声明周期中的值。这有极大几率发生,取决于
setFinalData
的执行效率如何。The text was updated successfully, but these errors were encountered: