[FE] refactor: Chatting Section 리팩토링 #215
Merged
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.
PR 설명
Chatting Section의 코드를 읽기 좋게 개선
✅ 완료한 기능 명세
고민과 해결과정
useInput을 더 범용성 있게 사용할 수 있도록 reset함수를 추가하여 값을 초기화시킬 수 있도록 변경했고, 해당 부분에 대한 테스트함수를 추가했다.
기존에 ChattingSection에 있던 로직부분을 hook으로 분리하고, 각 훅을 재사용할 수 있도록 작성했다.