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

[#232] Modify: useMetionNotification에서 mentionList 의존성 제거 #235

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jae-hun-e
Copy link
Collaborator

@jae-hun-e jae-hun-e commented Jan 24, 2024

📝 작업 내용

EditorTextArea에 container-presentational 패턴 적용을 하려다보니 문제가 발생했습니다.

onSubmit시 멘션리스트도 같이 보내야 하는데 기존의 멘션 리스트는 EditorTextArea.tsx내의 훅에서 props로 보내주기 때문에 가능했습니다.
하지만 패턴을 적용할 코드에서는 EditorTextArea.tsx 외부에서 onSubmit을 주입하기 때문에 props로 받을 수 없고

커스텀 훅의 Props로 mentionList를 받다보니 선언하는 시점에 mentionList가 없으면 쓸 수 없게되는 의존성이 생겼기 때문에 문제가 발생한 것입니다.

이를 mentionNotification 함수의 props로 변경해서 커스텀 훅의 의존성을 제거하였습니다.

그리고 기존에 타입가드로 분기처리를 해주던 useEditorLogicByProps.ts는 패턴 적용 후 사라질 훅 입니다!

💬 리뷰 요구사항

편하게 말씀해주세요!

close #232

커스텀 훅의 Props로 mentionList를 받다보니 선언하는 시점에 mentionList가 없으면 쓸 수 없게되는 의존성이 생긴다.

이를 mentionNotification 함수의 props로 변경해서 커스텀 훅의 의존성을 제거함.
@jae-hun-e jae-hun-e added the ✏️ Modify 기존 기능의 변경(코드 변경) label Jan 24, 2024
@jae-hun-e jae-hun-e self-assigned this Jan 24, 2024
Copy link

vercel bot commented Jan 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fedc-5-dev-namu-eunsu ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 25, 2024 7:55am

@bgyoons
Copy link
Collaborator

bgyoons commented Jan 24, 2024

에러 로그 입니다! :D

그리고 close#이슈번호 빠졌어요!

스크린샷 2024-01-24 오후 4 54 12

Copy link
Collaborator

@bgyoons bgyoons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

container-presentational 패턴 적용을 바로 하시다니 역시 zl존재훈 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✏️ Modify 기존 기능의 변경(코드 변경)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

useMetionNotification에서 mentionList 의존성 제거
2 participants