Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#2579·hooks

useInfiniteScroll 在第一次请求还未返回时,快速切换到其他组件,会造成无限循环的请求

Author: liujf-frontEndCreated Jun 25, 2024Updated Aug 25, 2026
Labelshelp wanted

image 此处会默认执行一次setTimeout,触发函数scrollMethod,当页面被销毁时,判断条件将永久成立,会一直触发loadMore

Source: alibaba/hooks

View original on GitHubView discussion on GitHub