-
Notifications
You must be signed in to change notification settings - Fork 0
[URH-57] useDeepCompareEffect 신규 #55
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
Conversation
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.
👍
@Choozii 지예 님 리뷰 한 번만 부탁드려요! |
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.
리뷰가 늦었네요... 수고하셨습니다 🆒 🆒 🆒
*/ | ||
const useDeepCompareEffect = ( | ||
callback: () => void, | ||
dependencies: unknown[] |
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.
[P5] 결국에 type 자체는 똑같기는 한데 React.DependencyList라는 타입이 있나바유!
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.
저도 그 타입을 사용해 보려고 했었는데 unknown[]
으로 작성하는 게 더 직관적이라고 판단해 봤습니다...!
ps. import 수를 줄이고 싶은 욕심도 한스푼...😅
👾 Pull Request
1️⃣ Spec
2️⃣ 변경 사항
isEqual()
함수를 사용하기 위해 fast-deep-equal 패키지를 추가하였습니다.isEqual()
함수를 직접 작성하려면 상당한 양의 코드가 필요합니다.3️⃣ 예시 코드
4️⃣ 관련 문서 (선택 사항)