[8팀 조영수] Chapter 2-2. 디자인 패턴과 함수형 프로그래밍#63
Open
JYPPAP wants to merge 3 commits intohanghae-plus:mainfrom
Open
Conversation
2. `useCoupons.ts` , `useProduct.ts` 에 data에서 직접 값을 가져와 사용하는 형태로 변경
- useCart 작업 - 기본 과제 통과 - 줄바꿈 및 공백 정리
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
배포 링크
https://jyppap.github.io/front_5th_chapter2-2/index.refactoring.html
과제의 핵심취지
과제에서 꼭 알아가길 바라는 점
기본과제
Component에서 비즈니스 로직을 분리하기
비즈니스 로직에서 특정 엔티티만 다루는 계산을 분리하기
뷰데이터와 엔티티데이터의 분리에 대한 이해
entities -> features -> UI 계층에 대한 이해
Component에서 사용되는 Data가 아닌 로직들은 hook으로 옮겨졌나요?
주어진 hook의 책임에 맞도록 코드가 분리가 되었나요?
계산함수는 순수함수로 작성이 되었나요?
Component에서 사용되는 Data가 아닌 로직들은 hook으로 옮겨졌나요?
주어진 hook의 책임에 맞도록 코드가 분리가 되었나요?
계산함수는 순수함수로 작성이 되었나요?
[?] 특정 Entitiy만 다루는 함수는 분리되어 있나요?
특정 Entitiy만 다루는 Component와 UI를 다루는 Component는 분리되어 있나요?
데이터 흐름에 맞는 계층구조를 이루고 의존성이 맞게 작성이 되었나요?
심화과제
재사용 가능한 Custom UI 컴포넌트를 만들어 보기
재사용 가능한 Custom 라이브러리 Hook을 만들어 보기
재사용 가능한 Custom 유틸 함수를 만들어 보기
그래서 엔티티와는 어떤 다른 계층적 특징을 가지는지 이해하기
UI 컴포넌트 계층과 엔티티 컴포넌트의 계층의 성격이 다르다는 것을 이해하고 적용했는가?
엔티티 Hook과 라이브러리 훅과의 계층의 성격이 다르다는 것을 이해하고 적용했는가?
엔티티 순수함수와 유틸리티 함수의 계층의 성격이 다르다는 것을 이해하고 적용했는가?
과제 셀프회고
과제를 하면서 내가 제일 신경 쓴 부분은 무엇인가요?
최대한 읽기 편한 상태로 만드는 것이 목표입니다.
내용을 읽을 때 기능에 대해서 연상이 가능한 변수와 함수 명을 사용하는 것을 목표로 했습니다.
계산 함수라면 일단 model 폴더로 분류하였고, hook 에서 사용할 수 있도록 하였습니다.
과제를 다시 해보면 더 잘 할 수 있었겠다 아쉬운 점이 있다면 무엇인가요?
현재 코드는 컴포넌트에서 props로 데이터 및 함수를 넘겨주고 있는 상태 입니다.
이 부분을 context 나 jotai 와 같은 것들을 활용해서 코드를 변경해보지 못한 것이 아쉬웠습니다.
또한 관리자 페이지 쪽의 작업을 하지 못한 것도 아쉬운 것 같습니다.
리뷰 받고 싶은 내용이나 궁금한 것에 대한 질문 편하게 남겨주세요 :)
리뷰 받고 싶은 내용이나 궁금한 것에 대한 질문
현재 AI를 이용해서 과제를 해결하고 있는데 이 방향이 맞는지 잘 모르겠습니다.
위와 같은 형태로 몇몇 과제를 하고 있는데 이런 방향이 옳은 방향인지 잘 모르겠습니다.
4번의 예시로 2-1 과제에서는 위와 같이 만들어달라고 요청한 뒤 내용을 채워넣는 형태로 작업을 했었습니다.