Open
Conversation
MintPansy
reviewed
May 7, 2026
Comment on lines
+33
to
+37
| <TabAtomic | ||
| key={item} | ||
| ref={(el) => { | ||
| refs.current[i] = el; | ||
| }} |
Contributor
There was a problem hiding this comment.
TabAtomic에 ref를 전달하고 있는데, 현재 컴포넌트가 forwardRef로 감싸져 있지 않아서 실제 button ref가 연결되지 않을 수 있을 것 같아요. indicator 위치 계산에 필요한 ref라면 forwardRef<HTMLButtonElement, Props>로 감싸는 방식이 더 안전해 보입니다!
Contributor
Author
There was a problem hiding this comment.
저도 처음에 forwardRef를 썼다가, 찾아보니 React19부터는 forwardRef 없이도 ref를 프로퍼티로 전달할 수 있게 됐다고 해서 지웠습니다!
MintPansy
reviewed
May 7, 2026
Comment on lines
+22
to
+23
| const activeIndex = items.indexOf(value); | ||
| const el = refs.current[activeIndex]; |
Contributor
There was a problem hiding this comment.
여기는 잘 구현해 주셨습니다! 혹시라도 value가 items에 없는 값으로 들어오는 경우를 대비해서 activeIndex === -1일 때 early return을 추가하는 방안도 괜찮을 거 같아요!
Contributor
Author
There was a problem hiding this comment.
그러네요! 이 부분은 좀 더 안전하게 수정해볼게요
MintPansy
reviewed
May 7, 2026
Contributor
MintPansy
left a comment
There was a problem hiding this comment.
고생하셨습니다! 전체적으로 구조 깔끔한 것 같습니다. 파일 내 몇 가지 코멘트만 확인 부탁드려요!
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.
📝 개요
TabAtomic, Tab 공통 컴포넌트를 구현했습니다. 후기 필터용 컴포넌트는 이것과 별도라고 PD측으로부터 전달받아서 style=fill은 제외하고 이미지에 보이는 2가지만 만들었습니다. 탭 전환 시 하단 막대기(?)에 슬라이딩(?) 애니메이션을 적용했습니다.
🔗 관련 이슈
🛠️ 변경 사항 (Checklist)
✅ 아래 내용을 한 번 더 점검해 주세요
1. 의도와 가독성 (Naming & Readability)
2. 타입과 논리 (Type Safety & Logic)
any사용을 지양하고, 모든 함수의 반환 타입을 명시했나요?null/undefined), 에러가 발생할 경우를 처리했나요?3. 코드 다이어트 (Clean-up)
console.log나 사용하지 않는import를 모두 지웠나요?4. 지속 가능성 (Sustainability)
README업데이트가 필요한가요?💭 회고 (Optional)