Merged
Conversation
2 tasks
GreenteaHT
reviewed
Nov 18, 2024
Comment on lines
+9
to
+22
| useEffect(() => { | ||
| const handleResize = () => { | ||
| setWindowSize({ | ||
| width: window.innerWidth, | ||
| height: window.innerHeight, | ||
| }); | ||
| }; | ||
|
|
||
| window.addEventListener("resize", handleResize); | ||
|
|
||
| return () => { | ||
| window.removeEventListener("resize", handleResize); | ||
| }; | ||
| }, []); |
Contributor
There was a problem hiding this comment.
스크롤 이벤트는 엄청나게 발생하니 throttling을 이용해서 제한을 주는 건 어떨까요? 그리고 height에 대한 변화를 조건문으로 두어서 width에 대한 setter도 과감하게 빼버리는게 성능개선에 도움이 될 것 같아요!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
이슈
🔗 이슈 링크 #68
#93
해당 PR 은 중복되었으므로, 위 링크에서 PR 을 참고해주세요!
요약
작업내용
참고사항
virtualScroll브랜치로 이동하여, 잘 동작하는지 확인부탁드립니다 !PR 체크 사항
주의 사항
PR 전 체크리스트
리뷰 반영사항