Skip to content

Conversation

using2
Copy link

@using2 using2 commented Oct 8, 2025

✅ 워크북 체크리스트

  • 모든 핵심 키워드 정리를 마쳤나요?
  • 핵심 키워드에 대해 완벽히 이해하셨나요?
  • 이론 학습 이후 직접 실습을 해보는 시간을 가졌나요?
  • 미션을 수행하셨나요?
  • 미션을 기록하셨나요?

✅ 컨벤션 체크리스트

  • 디렉토리 구조 컨벤션을 잘 지켰나요?
  • pr 제목을 컨벤션에 맞게 작성하였나요?
  • pr에 해당되는 이슈를 연결하였나요?(중요)
  • 적절한 라벨을 설정하였나요?
  • 파트장에게 code review를 요청하기 위해 reviewer를 등록하였나요?
  • 닉네임/main 브랜치의 최신 상태를 반영하고 있는지 확인했나요?(매우 중요!)

📌 주안점

Comment on lines +283 to +293
{step === 1 && <EmailStep onNext={handleEmailNext} />}
{step === 2 && (
<PasswordStep onNext={handlePasswordNext} onPrev={() => setStep(1)} />
)}
{step === 3 && (
<NicknameStep
onSubmit={handleNameSubmit}
onPrev={() => setStep(2)}
email={collected.email!}
/>
)}

Choose a reason for hiding this comment

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

저는 이 페이지를 구현할 때 컴포넌트를 분리하지 못해서 코드의 가독성이 좀 떨어졌었는데 이런 식으로 깔끔하게 구현할 수 있었네요. 꼭 다른 폴더로 분리하지 않아도 하나의 페이지 안에서 해결할 수 있는 좋은 방식이네요 !

controllerRef.current?.abort();
controllerRef.current = new AbortController();

try {
Copy link
Collaborator

Choose a reason for hiding this comment

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

controllerRef를 통해 기존 요청을 중단하고 새 요청으로 교체하는 구조가 아주 좋습니다.
다만 에러 발생 후 재요청 시 이전 에러 상태가 유지되지 않도록, setIsError(false)를 통해 에러 상태를 수동으로 초기화하는 것을 추천합니다

@@ -0,0 +1,34 @@
import { ChangeEvent, useEffect, useState } from "react";

interface UseFormProps<T> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

제너릭(T)을 활용해 useForm 훅이 다양한 폼 구조에 재사용될 수 있도록 설계한 부분이 정말 좋습니다.

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.

Chapter04_사용자 인증부터 폼 유효성 검사까지, 서비스의 기본기 다지기

3 participants