[6팀 김혜연] [Chapter 2-2] 디자인 패턴과 함수형 프로그래밍 #42
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.
과제 체크포인트
기본과제
React의 hook 이해하기
함수형 프로그래밍에 대한 이해
Component에서 비즈니스 로직을 분리하기
비즈니스 로직에서 특정 엔티티만 다루는 계산을 분리하기
Component에서 사용되는 Data가 아닌 로직들은 hook으로 옮겨졌나요?
주어진 hook의 책임에 맞도록 코드가 분리가 되었나요?
계산함수는 순수함수로 작성이 되었나요?
심화과제
뷰데이터와 엔티티데이터의 분리에 대한 이해
엔티티 -> 리파지토리 -> 유즈케이스 -> UI 계층에 대한 이해
Component에서 사용되는 Data가 아닌 로직들은 hook으로 옮겨졌나요?
주어진 hook의 책임에 맞도록 코드가 분리가 되었나요?
계산함수는 순수함수로 작성이 되었나요?
특정 Entity만 다루는 함수는 분리되어 있나요?
특정 Entity만 다루는 Component와 UI를 다루는 Component는 분리되어 있나요?
데이터 흐름에 맞는 계층구조를 이루고 의존성이 맞게 작성이 되었나요?
과제 셀프회고
회사 업무로 인해 심화 과제를 충분히 심도 있게 진행하지 못했습니다. 주어진 과제는 기능 추가 상황을 가정하여 커스텀 훅을 직접 구현하는 것이었는데, 저는 컴포넌트의 내부 함수를 분리해 훅으로 만드는 수준에 그쳤고, 채점 기준에 부합하는 고도화된 훅을 구현하지 못했습니다. 결과적으로 기본 기능을 단순히 분리한 것에 불과해 테스트 코드 작성의 실질적인 의미는 크지 않았습니다. 하지만 테스트 코드 작성 연습을 목적으로 처음부터 테스트 코드를 작성해보는 시도를 해보았습니다.
질문 내용
커스텀 훅의 구현 방향에 대한 피드백: