-
Notifications
You must be signed in to change notification settings - Fork 5
[박세은] 과제 제출 #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[박세은] 과제 제출 #9
Conversation
App.js에 react-router-dom 을 사용해 Home, SignUp 페이지 라우팅
kwakseongjae
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리뷰를 원했던 두 기능을 구현하는데 충돌한만한 부분이 있나 체크해봤는데
규모가 작아서 그런지 문제될 부분은 없어보였어 !!
고민한 흔적이 보이는 작업물이라서 좋았습니당 !!!
에러와 관련된 부분을 분기처리하는 로직이 따로 있으면 좋겠다는 생각은 드네요 ! (시간 남으면 리팩토링 !?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tailwind는 기본적으로 reset css가 적용된답니다.
안써도 돼요 !!
아래 아티클 한번 구경해보세요 ~~!~!
https://www.daleseo.com/tailwind-preflight/
| <BrowserRouter> | ||
| <Routes> | ||
| <Route path="/" element={<HomePage />} /> | ||
| <Route path="/signup" element={<SignUpPage />} /> | ||
| </Routes> | ||
| </BrowserRouter> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SignUpButton이라고 따로 컴포넌트를 나눌 필요가 있나 싶어 !
커스텀 잘 했잖아 Tailwind ! 그걸로 한번 써봐
Tailwind 쓸때 이런식으로 컴포넌트화시켜서 쓰진 않는거같아
| const emailRegex = | ||
| /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; | ||
| const passwordRegex = /^(?=.*\d)(?=.*[a-z])(?=.*[!@#])[\da-zA-Z!@#]{8,16}$/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이런 상수는 난 최상단(함수 컴포넌트 외부)으로 올리거나
아예 파일로 빼서 관리하는 편이야 !
| }; | ||
|
|
||
| return ( | ||
| <form onSubmit={handleSubmit(onSubmit)}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이렇게 짜는게 좋은 코드인지 잘 모르겠네 ..!
다른 리드분 의견은 다를지 모르겠는데
나였으면 onSubmit함수안에서 handleSubmit을 호출하지 않을까 싶어 ! 그러면 onSubmit만 전달하면 되겠지 ?
onSubmit으로 handleSubmit에 onSubmit을 콜백으로 전달하는 구조가 가독성이 좋아보이진 않넹
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요고 컨벤션인가,, 상우도 이렇게 쓴거보면 내가 잘못된걸지도 !?
| <label className="labelText" htmlFor="email"> | ||
| 이메일 | ||
| </label> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍👍
✨ 프로젝트 링크
🛠️ Motivation
사용 이유
react-hook-form
react-router-dom
tailwind
🔑 Key Changes
🙏🏼 To Reviewers
추후에 해당 기능들을 추가할 예정입니다.
아래 기능들 추가 구현 할 때, 방해될 만한 요소들?이 없는지 고려해서 봐주시면 감사하겠습니다!