-
Notifications
You must be signed in to change notification settings - Fork 1
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
perf: 댓글이 보여지는 부분에 memo를 적용하라 #609
Conversation
saseungmin
commented
Feb 5, 2023
- 상세 페이지의 댓글에 React.memo를 적용하여 성능 최적화
- 상세 페이지의 댓글에 React.memo를 적용하여 성능 최적화
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Bundle SizesCompared against d14bde2 Route: No significant changes found Dynamic import: No significant changes found |
⚡️ 1 Lighthouse report!
⚡️ 2 Lighthouse report!
⚡️ 3 Lighthouse report!
|
const commentViewPropsAreEqual = (prevProps: Props, nextProps: Props) => ( | ||
prevProps.comment.commentId === nextProps.comment.commentId | ||
&& prevProps.userUid === nextProps.userUid | ||
&& prevProps.onRemove === nextProps.onRemove | ||
&& prevProps.comment.writer.uid === nextProps.comment.writer.uid | ||
&& prevProps.comment.groupId === nextProps.comment.groupId | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
댓글이 보여지는 각 아이템을 memo로 감싸주어 성능 최적화를 하기 위해서 props비교를 수동으로 적용
react는 얕은 비교로 비교한다
export default memo(TagsBar); | ||
export default TagsBar; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
불필요한 memo 제거