useInfiniteScroll 在第一次请求还未返回时,快速切换到其他组件,会造成无限循环的请求
Open
help wanted
- Dominant language
- TypeScript
- Stars
- 15k
- Forks
- 2.8k
- Avg merge
- 15h 7m
- Merged PRs (30d)
- 2
Description

此处会默认执行一次setTimeout,触发函数scrollMethod,当页面被销毁时,判断条件将永久成立,会一直触发loadMore
Contributor guide
Research direction
Start at the useInfiniteScroll entry point and reproduce a rapid switch or unmount while the first request is still pending. Trace the delayed scrollMethod and loadMore calls, then verify that destroying the page stops further requests and add a regression test for this sequence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100