-
Notifications
You must be signed in to change notification settings - Fork 2
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
[민우] - 작성 가능 리마인드 아이템 컴포넌트 구현 #54
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.
로직이 굉장히 복잡하군요.. 컴포넌트 만드시느라 고생 많으셨습니다 민우님!
굉장히 잘 만드신 것 같습니다 👍
const isRemindMessageEmpty = useMemo(() => { | ||
return remindMessage.length === 0; | ||
}, [remindMessage]); | ||
|
||
const isFirstRemindItem = useMemo(() => { | ||
return makeAllRemindMessageSame !== undefined; | ||
}, [makeAllRemindMessageSame]); |
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.
useMemo 사용하셨군요 👍
</div> | ||
)} | ||
</div> | ||
{isSameMessageModalOpen && isSameMessageChecked === false && ( |
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.
로직이 복잡하네요..😭 약간이라도 짧게 쓰려면 이 방법은 어떠신가요
{isSameMessageModalOpen && isSameMessageChecked === false && ( | |
{isSameMessageModalOpen && !isSameMessageChecked && ( |
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.
오오 왜 저렇게 썼을까요 저 ㅋㅋㅋㅋ 감사합니닷
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.
lgtm 고생하셨습니다.👍
handleChangeRemindMessage, | ||
makeAllRemindMessageSame, | ||
}: WritableRemindItemProps) { | ||
const isRemindMessageEmpty = useMemo(() => { |
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.
계산이 복잡하지 않으니 useMemo를 안써도 isRemindMessageEmpty 를 사용하는 곳에 remidMessage.length === 0
통해서 처리해도 괜찮을것 같습니다
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.
앗 컴포넌트 return 부분이 좀 복잡해서 최대한 줄여서 가독성을 높이려는 의도로 만들긴 했는데 한번 고려해보겠슴다 ^^
📌 이슈 번호
close #47
🚀 구현 내용
Writable.mp4
📘 참고 사항
인자로 넣어줘야 할 data
호출 예시