Skip to content

[SearchGoals/LookupGoals] 무한 스크롤 기능 최적화 #224

@YujeanSohn

Description

@YujeanSohn

문제 상황

  • onScroll 이벤트를 사용하여 불필요한 scroll event handler 실행이 되면서 메모리가 낭비됨

해결 방안

  • web API중 Intersection Observer API를 사용하도록 수정.

현재까지 랜더링 된 목표 목록 요소 중 가장 마지막 요소 DOM이 스크롤 DOM 화면에 겹치면 이벤트 핸들러를 호출하여

pagination 값을 변경하고, API 호출을 하여 불필요한 이벤트 핸들러 호출을 줄일 수 있음.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions