understanding of React hooks lifecyclebasic knowledge of useEffect cleanup
新手友善度1-100 的估計分數,表示該議題對首次貢獻者的友善程度。
50
研究方向
Investigate the useInfiniteScroll hook implementation, specifically the setTimeout call that triggers scrollMethod. The issue suggests that when the component unmounts before the timeout fires, the condition becomes permanently true causing infinite loadMore calls. Check the cleanup logic in the useEffect and ensure that the timeout is cleared on unmount. Look at the return statement of the effect to see if clearTimeout is called. The relevant file is likely `src/useInfiniteScroll/index.ts` or similar. Also review any existing comments or related PRs for proposed fixes.