Skip to content
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

Maximum update depth exceeded. #580

Open
longhonour opened this issue Nov 11, 2024 · 0 comments
Open

Maximum update depth exceeded. #580

longhonour opened this issue Nov 11, 2024 · 0 comments

Comments

@longhonour
Copy link

버그: 예시 주소 https://kg9xy4.csb.app/ 에서 브라우징할 때 페이지 하단까지 스크롤하면 데이터를 로드하는 중에 마우스 휠을 위로 다시 스크롤할 경우 여러 번 반복적으로 빠르게 스크롤하면 오류가 발생합니다. 아래 이미지와 자세한 오류 정보가 있습니다. setState가 데이터를 업데이트하면서 onRequestAppend를 트리거하고, 다시 setState를 트리거하여 무한 루프가 발생하는 것으로 추측됩니다.
image
`
Error
Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
▶ 33 stack frames were collapsed.
eval
/src/App.tsx:39:8
36 |
37 | setTimeout(() => {
38 | e.ready();

39 | setItems([
| ^
40 | ...items,
41 | ...getItems(nextGroupKey, 10),
42 | ]);
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant