-
Notifications
You must be signed in to change notification settings - Fork 26
[최민경] Sprint 6 #144
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: react-최민경
Are you sure you want to change the base?
[최민경] Sprint 6 #144
Conversation
| </App> | ||
| </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.
태빈님한테 동일한 리뷰 달아드렸어요.
경로를 직접 입력하는 방식이 직관적으로 보일 수 있지만, 유지보수성과 확장성을 고려했을 때 상수로 분리하는 것이 더 유리합니다.
1.1 유지보수 용이성
-
특정 URL이 변경될 경우, 해당 경로를 사용한 모든 곳을 일일이 찾아 수정해야 합니다.
-
상수로 관리하면 단 한 곳에서 수정하면 되므로, 유지보수가 쉬워집니다.
-
예를 들어, community를 communities로 변경한다고 가정할 때, 상수를 사용하면 한 곳만 수정하면 되지만, 직접 입력하는 방식이라면 여러 곳을 변경해야 합니다.
1.2 일관성 유지
-
프로젝트 내에서 같은 URL을 일관되게 사용할 수 있습니다.
-
오타로 인한 버그를 방지할 수 있습니다.
1.3 가독성 향상
-
경로를 상수로 분리하면 코드의 역할이 분명해집니다.
-
라우트 설정과 실제 경로값이 분리되어, 전체적인 구조를 이해하기 쉬워집니다.
| keyWord = "", | ||
| } = {}) => { | ||
| try { | ||
| validnum(page, "page"); |
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.
숫자 검증 피드백 반영 잘 하셨어요!!
| setTagInput(e.target.value); | ||
| } | ||
| }; | ||
|
|
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.
나중에 타입스크립트 들어가면 form을 더 체계적으로 다루는 방법 배워볼거에요! 우선 팀 프로젝트 때 자세히 논의해봐요~
| }; | ||
|
|
||
| const handleKeyDown = (e) => { | ||
| if (e.key === "Enter" && tagInput.trim() !== "") { |
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.
여기에 뭔가 하나 빠진거같아요~ 무엇일까요?
| className={ | ||
| isSubmit | ||
| ? styles["register-button"] | ||
| : styles["register-button-disabled"] |
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.
cursor: not-allowed; 추가해주세요!
| return valid === ""; | ||
| }; | ||
| return { valids, validate }; | ||
| }; |
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.
파일명을 useValidation 으로 바꿔주세요.
|
|
||
| export const useDevice = () => { | ||
| const [device, setDevice] = useState(); | ||
| }; |
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.
파일명을 useDevice로 바꿔주세요.
|
css가 조금 부족하긴 합니다만, tawilnd 쓰시면 조금 편하실건데 내일 멘토링 시간때 논의해봐요! |


요구사항
기본 요구사항
공통
프론트엔드 구현 요구사항
랜딩 페이지
중고마켓 페이지
상품 등록 페이지
심화 요구사항
프론트엔드 구현 요구사항
상품 등록 페이지
유효한 조건
링크
https://6-sprint-mission-fe-qe9c.vercel.app/
주요 변경사항
스크린샷
멘토에게