Skip to content

Maximum update depth exceeded. #580

Open
@longhonour

Description

버그: 예시 주소 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 | ]);
`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions