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

thouch move event, window resize event에 debounce, throttle 적용 #51

Open
Bhanjo opened this issue Aug 1, 2023 · 0 comments
Open
Labels

Comments

@Bhanjo
Copy link
Collaborator

Bhanjo commented Aug 1, 2023

터치 이동 이벤트 및 리사이즈 이벤트는 여러 번 호출되는 이벤트이다.
만약 터치 이동을 100px을 하게 된다면 이벤트 호출 또한 100번이 된다.
이 문제 때문에 이벤트 내부에서 반복적으로 호출되는 함수로 인해 성능 저하가 발생할 수 있다.

따라서 위 이벤트에 debouce, throttle을 적용한다. 적용 라이브러리는 lodash의 기능을 사용 예정

lodash debouce, throttle에 대한 설명은 여기를 참고

대상 기능

  • useWindowResize
  • thouchMoveDrag
  • 기타 리사이즈, 드래그 이벤트가 발생하는 함수
@Bhanjo Bhanjo added the Todo label Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant