[김희성] sprint8#176
Merged
dongqui merged 1 commit intocodeit-bootcamp-frontend:React-김희성from May 23, 2025
Hidden character warning
The head ref may contain hidden characters: "React-\uae40\ud76c\uc131"
Merged
Conversation
dongqui
approved these changes
May 23, 2025
Collaborator
dongqui
left a comment
There was a problem hiding this comment.
희성님, 근래 정말 열심히 달리시는군요! 🏃 👍
아직 타입스크립트 활용은 많이 없는 거 같습니다. 아마 기존의 코드를 옮기느냐고 시간을 많이 소비하셨을 거 같아요! 타입스크립트 환경은 만들어 졌으니 스프린트 진행중 차근차근 적용해 보시면 될 거 같습니다!
| validateEmail(email) === "" && validatePassword(password) === ""; | ||
|
|
||
| const handleLogin = async (e) => { | ||
| const handleLogin = async (e: React.FormEvent<HTMLFormElement>) => { |
| validateAll(); | ||
| }, [validateAll]); | ||
|
|
||
| const handleBlur = (type: "email" | "nickname" | "password" | "confirm") => { |
Collaborator
There was a problem hiding this comment.
controlled/uncontrolled 컴포넌트 개념을 알아두시면 좋습니다!
지금 같은 경우 세부적으로 핸들링해야할 때는 controlled로 구현하시는 것이 좋을 수 있습니다.
아니면 react-hook-form 같은 라이브러리를 사용하시는 것도 좋아요 :)
Collaborator
There was a problem hiding this comment.
타입스크립트를 쓰시니 zod도 궁합이 좋습니다!!
| const password = passwordRef.current?.value.trim() ?? ""; | ||
| const passwordConfirm = passwordConfirmRef.current?.value.trim() ?? ""; | ||
|
|
||
| const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; |
Collaborator
There was a problem hiding this comment.
중복되는 코드, 로직이 많습니다 😢 아마 리엑트로 옮기느냐고 정신이 없으셨을 거 같아요!
ref로 직접 접근하기 때문에 이벤트마다 따로 처리하느냐고 중복되는 느낌도 있는 거 같습니다.
여유가 되실 때 천천히 리팩토링 해보셔도 좋을 거 같아요 :)
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.
요구사항
기본
심화
주요 변경사항
스크린샷
랜딩페이지
로그인
회원가입
멘토에게