Skip to content

[김성은] sprint6#121

Merged
Irelander merged 8 commits intocodeit-sprint-fullstack:react-김성은from
seongEun95:react-김성은-sprint6
Aug 26, 2025

Hidden character warning

The head ref may contain hidden characters: "react-\uae40\uc131\uc740-sprint6"
Merged

[김성은] sprint6#121
Irelander merged 8 commits intocodeit-sprint-fullstack:react-김성은from
seongEun95:react-김성은-sprint6

Conversation

@seongEun95
Copy link

@seongEun95 seongEun95 commented Aug 24, 2025

배포주소

https://panda-market-kr.netlify.app/

요구사항

기본 요구사항

공통

  • Github에 스프린트 미션 PR을 만들어 주세요.
  • React, Express를 사용해 진행합니다.

프론트엔드 구현 요구사항

랜딩 페이지

  • HTML과 CSS로 구현한 랜딩페이지를 React로 마이그레이션하세요.
  • 랜딩 페이지 url path는 "/"로 설정하세요.

중고마켓 페이지

  • 중고마켓 페이지 url path를 "/items"으로 설정하세요.
  • 페이지 주소가 "/items" 일 때 상단내비게이션바의 "중고마켓" 버튼의 색상은 "3692FF"입니다.
  • 중고마켓 페이지 판매 중인 상품은 본인이 만든 GET 메서드를 사용해 주세요.
  • 다만 좋아요 순 정렬 기능은 제외해 주세요.
  • 사진은 디폴트 이미지로 프론트엔드에서 처리해주세요.
  • 베스트 상품 목록 조회는 구현하지 않습니다.
  • '상품 등록하기' 버튼을 누르면 "/registration" 로 이동합니다. ( 빈 페이지 )

상품 등록 페이지

  • PC, Tablet, Mobile 디자인에 해당하는 상품 등록 페이지를 만들어 주세요.
  • 상품 등록 url path는 "/registration"입니다.
  • 상품 등록은 본인이 만든 POST 메서드를 사용해 주세요.
  • 등록 성공 시, 해당 상품 상세 페이지로 이동합니다. (빈페이지)

심화 요구사항

프론트엔드 구현 요구사항

상품 등록 페이지

  • 모든 입력 input box에 빈 값이 있을 경우, 등록 버튼이 비활성화됩니다.
  • 태그를 입력한 후 엔터키를 누르면, 그 태그가 칩 형태로 쌓입니다.
  • 상품명, 상품 소개, 판매 가격, 태그에 대한 유효성 검사 Custom Hook을 만들어주세요. 유효성 검사를 통과하지 않을 경우, 각 input에 빨간색 테두리와, 각각의 Input 아래에 빨간색 에러 메시지를 보여주세요.

*유효한 조건

  • 상품명: 1자 이상, 10자 이내
  • 상품 소개: 10자 이상, 100자 이내
  • 판매 가격: 1자 이상, 숫자
  • 태그: 5글자 이내

시연 영상

  • 리스트페이지
default.mp4
  • 등록페이지
default.mp4

Copy link
Collaborator

@Irelander Irelander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

프론트엔드 쪽은 Atomic Design 패턴으로 컴포넌트를 잘게 나누고, 커스텀 훅까지 활용해서 구조가 정말 깔끔했어요. PropTypes는 없지만 인터페이스가 명확해서 큰 문제는 없어 보였습니다.

코드 스타일도 ESLint와 Prettier로 잘 맞춰서 읽기 편했고, 전반적으로 실무에 가까운 완성도를 보여주셨습니다. 아키텍처 설계, 일관된 스타일, 로직 분리, 사용자 경험까지 신경 쓴 부분이 특히 좋았어요.

앞으로는 에러 처리, 성능 최적화를 조금만 더 다듬으면 완성도가 훨씬 높아질 것 같습니다. 이미 초급을 넘어선 수준이라고 말씀드리고 싶네요!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

함수에서 에러 발생시 리턴값 ( catch )이 명시되어 있지 않아서 undefined가 반환됩니다. 이러면 호출하는쪽에서 예상치 못한 동작이 발생할 가능성이 있어요! ㅎㅎ 백엔드 API의 응답은 모든 케이스에 대해서 응답을 해주는게 좋아요!


return response.data;
} catch (error) {
console.error(error);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

에러를 리턴해주는게 좋아요! 4xx, 5xx등 적절한 상태메세지와 에러메세지와 함께 보내주면 좋습니다 :)

formData.productPrice !== '' && // 판매가격 입력 여부
formData.tags.length > 0; // 태그 입력 여부

const hasError = Object.values(isValid).some((v) => v.isValid); // 유효성 검사에 실패한 항목이 하나라도 있으면 true를 반환
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hasError변수명이 더 정확한 목적을 가지고 있어서 구체적으로 바꾸면 더 좋아 보여요 ( 실제로는 "유효한 필드가 있는지"를 확인합니다 )

const hasValidationError = Object.values(isValid).some((v) => !v.isValid);
const isAllFieldsFilled = isFormValid;
setIsDisabled(!isAllFieldsFilled || hasValidationError);

위의 코드처럼 조금 더 구체적으로 변수명을 선언해줘도 좋을꺼 같아요 !

const response = await postProduct(product);
navigate(`/items/${response._id}`);
} catch (error) {
console.error(error);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

에러 처리가 사용자에겐 메세지를 보여주지 않아 에러가 발생하는경우 사용자는 동작하지 않는것처럼 느껴지게 됩니다!
사용자 친화적인 에러 메세지를 보여주고 추가로 로딩 ( 스피너 ) 상태를 보여주면 더 좋아질꺼 같습니다 !

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 에러 바운더리가 없어서 런타임 에러가 발생 시 전체 앱이 동작하지 않을수 있습니다 ! 에러 바운더리를 사용해보면 어떨까요 ?
  2. 로딩상태나 subspense 처리가 없어 초기 로딩 시 빈 화면이 보일수 잇을꺼 같아요! 관련된 처리를 하면 더 유려해질꺼 같습니다 :)

@Irelander Irelander merged commit 6941bf6 into codeit-sprint-fullstack:react-김성은 Aug 26, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants