Skip to content

[4주차/동동] 워크북 제출합니다.#42

Open
bukyung03 wants to merge 4 commits intoUMC-Inha:동동/mainfrom
bukyung03:main
Open

[4주차/동동] 워크북 제출합니다.#42
bukyung03 wants to merge 4 commits intoUMC-Inha:동동/mainfrom
bukyung03:main

Conversation

@bukyung03
Copy link
Copy Markdown

@bukyung03 bukyung03 commented Apr 8, 2026

✅ 워크북 체크리스트

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

✅ 컨벤션 체크리스트

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

📌 주안점

Comment thread mission/chapter04/mission01/src/hooks/useCustomFetch.ts
Comment thread mission/chapter04/mission01/src/pages/MovieListPage.tsx
Comment thread mission/chapter04/mission03/src/api/authApi.ts Outdated
const SignupPage = () => {
const navigate = useNavigate();
const [step, setStep] = useState<Step>('email');
const [email, setEmail] = useState('');
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

email, password를 각각 state로 관리하고 있는것으로 보입니다.
{ email: string, password: string}으로 타입 지정된 하나의 state로 묶어서 관리하면 어떨까요?
[form, setForm] = useState<Form(임의 interface)>({ email: "", password: "" }) 로 지정하고
상태를 바꿀 땐
setForm(prev => ({...prev, [바꿀대상]: value}))으로 진행하면 좋을것 같아요

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

말씀해주신 대로 email과 password를 각각 관리하는 것보다 SignupForm 인터페이스로 묶어서 하나의 state로 관리하는 게 더 좋은것 같네요

setForm(prev => ({ ...prev, [field]: value })) 패턴으로 수정했습니다!

Copy link
Copy Markdown
Collaborator

@qkrdmsthff qkrdmsthff left a comment

Choose a reason for hiding this comment

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

LGTM 동동 이번주차도 수고하셨습니다 ~~ 피드백 늦어져서 죄송해요 ㅠㅠ


return () => { cancelled = true; };
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [depsKey]);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

현재 useEffect 안에서 fetchFn 을 호출하나, fetchFn 은 의존성 배열 [depsKey] 에 포함되어 있지 않습니다 fetchFn 도 의존성 배열에 넣거나, 호출부에서 useCallback 으로 감싸서 넘기도록 해결해 볼 수 있겠네요!

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.

5 participants