[신민준] Sprint 11#153
Merged
Irelander merged 50 commits intocodeit-sprint-fullstack:next-신민준from Dec 1, 2025
Merged
Conversation
…etState 관련 ESLint 비활성화 처리
feat: ProductDetailPage 파일 생성
Feat/migrate-ts
chore: remove package-lock.json for PR
chore: install package-lock.json for PR
Irelander
approved these changes
Dec 1, 2025
Collaborator
Irelander
left a comment
There was a problem hiding this comment.
민준님 코드 처음 보는데 구조도 깔끔하고 코드도 가독성 좋게 잘 작성하시는데요 ? 실력자의 냄새가 납니다 ~ ㅎㅎ
이번 스프린트 PR에서는 아래의 내용만 조금 더 살펴보면 좋을꺼 같았어요 ㅎㅎ
- 타입 추론 강화: React Query 훅(
useCreateArticle)을 만들 때 제네릭을 명시해주면, 사용하는 컴포넌트에서 데이터와 에러 타입을 더 명확하게 알 수 있어 개발 경험이 좋아집니다. - 앱 초기화 로직 보완:
AuthBootstrapper에서 토큰이 없을 때 단순히 리턴해버리면 로딩 상태가 풀리지 않아 앱이 멈춘 것처럼 보일 수 있습니다. 토큰이 없더라도 로딩 상태를 종료(markUserLoaded)해주는 처리가 필요해요. - 폼 관리:
ArticleForm에서useState로 폼을 관리하고 있는데, 이미 설치된react-hook-form을 활용하면 렌더링 최적화와 코드 간소화 효과를 볼 수 있을 거예요.
스프린트 마지막까지 화이팅입니다! 이번 스프린트 미션도 고생많으셨어요 ㅎㅎ
| try { | ||
| const token = getAccessToken(); | ||
|
|
||
| if (!token) { |
Collaborator
There was a problem hiding this comment.
토큰이 없을 때도 로딩 상태를 완료로 표시해야, 이후의 인증 가드(AuthGuard) 로직이 정상적으로 동작할것 같아요!
| import { useRouter } from 'next/navigation'; | ||
| import { useEffect, useState } from 'react'; | ||
|
|
||
| const ArticleForm = ({ articleId = '' }: { articleId?: string }) => { |
Collaborator
There was a problem hiding this comment.
Props 타입을 인라인으로 작성하기보다 interface로 분리하면 가독성과 재사용성이 좋아져요!
| import { useMutation } from '@tanstack/react-query'; | ||
| import { createArticle, updateArticle } from '@/services/article.service'; | ||
|
|
||
| export const useCreateArticle = () => { |
Collaborator
There was a problem hiding this comment.
useMutation의 제네릭 타입을 명시해주면 컴포넌트에서 사용할 때 data나 error의 타입 추론이 훨씬 강력해집니다.
export const useCreateArticle = (): UseMutationResult<ArticleResponse, Error, CreateArticleParams> => { ... }
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.
요구사항
기본 요구사항
공통
프론트엔드
Comment