Conversation
5wintaek
reviewed
Jun 5, 2024
Comment on lines
+14
to
+15
| <OnboardingPage isLoadingPage={false} /> | ||
| ); |
Collaborator
There was a problem hiding this comment.
isLoading 이랑 setIsLoading props 지정 안해줘두 돼 ?
Comment on lines
+4
to
+6
| const ModalPortal = ({ children }: ChildrenProps) => { | ||
| const el: HTMLElement | null = document.getElementById('modal'); | ||
| return ReactDOM.createPortal(children, el as Element | DocumentFragment); |
Collaborator
There was a problem hiding this comment.
이쪽 부분 설명좀 ..! el을 뭘 위해서 썻는지 ?
Collaborator
There was a problem hiding this comment.
return ReactDOM.createPortal(children, el as Element | DocumentFragment); 이거 타입 지정 규칙 찾아보기
Comment on lines
+12
to
15
| const Button = styled.button<{ $isQuiz: boolean }>` | ||
| background-color: ${({ theme, disabled }) => | ||
| disabled ? theme.colors.gray300 : theme.colors.prime}; | ||
| color: ${({ theme }) => theme.colors.white}; |
Collaborator
There was a problem hiding this comment.
왜 button 에 $isQuiz를 썻는지 궁금!
Collaborator
There was a problem hiding this comment.
$ : 프리픽스
프리픽스를 사용하지 않으면 styled-component 에 props를 넘겨줄 때 에러가 뜬다
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.
✅ 작업 내용
📌 이슈 사항
1️⃣ 함수 역할 분리
단일 책임 원칙에 따라 하나의 함수가 하나의 역할만 수행하도록 최대한 함수를 분리했습니다!
타입 지정하는 부분도 하나의 폴더로 분리해서 타입별로 모아뒀습니다.
2️⃣ nullable, any 사용 지양
3️⃣ Early Return
✍ 궁금한 것
1️⃣ tsconfig.json / tsconfig.node.json
vite로 프로젝트를 구현하면 초기 생성 시에 항상 생기던 파일들이라 큰 생각을 안했었는데 이번에 마이그레이션하면서 보니까 쟤네 둘의 차이가 뭘까 . . 궁금하더라구요 !
그래서 가볍게 찾아봤고, 파일 내부는 vite로 프로젝트 만들었을 때 기본 생성되던 옵션 위주로 넣었습니다.
tsconfig.jsontsconfig.node.json