Open
Conversation
| </App> | ||
| </BrowserRouter> | ||
| ); | ||
| } |
There was a problem hiding this comment.
태빈님한테 동일한 리뷰 달아드렸어요.
경로를 직접 입력하는 방식이 직관적으로 보일 수 있지만, 유지보수성과 확장성을 고려했을 때 상수로 분리하는 것이 더 유리합니다.
1.1 유지보수 용이성
-
특정 URL이 변경될 경우, 해당 경로를 사용한 모든 곳을 일일이 찾아 수정해야 합니다.
-
상수로 관리하면 단 한 곳에서 수정하면 되므로, 유지보수가 쉬워집니다.
-
예를 들어, community를 communities로 변경한다고 가정할 때, 상수를 사용하면 한 곳만 수정하면 되지만, 직접 입력하는 방식이라면 여러 곳을 변경해야 합니다.
1.2 일관성 유지
-
프로젝트 내에서 같은 URL을 일관되게 사용할 수 있습니다.
-
오타로 인한 버그를 방지할 수 있습니다.
1.3 가독성 향상
-
경로를 상수로 분리하면 코드의 역할이 분명해집니다.
-
라우트 설정과 실제 경로값이 분리되어, 전체적인 구조를 이해하기 쉬워집니다.
| keyWord = "", | ||
| } = {}) => { | ||
| try { | ||
| validnum(page, "page"); |
| setTagInput(e.target.value); | ||
| } | ||
| }; | ||
|
|
There was a problem hiding this comment.
나중에 타입스크립트 들어가면 form을 더 체계적으로 다루는 방법 배워볼거에요! 우선 팀 프로젝트 때 자세히 논의해봐요~
| }; | ||
|
|
||
| const handleKeyDown = (e) => { | ||
| if (e.key === "Enter" && tagInput.trim() !== "") { |
| className={ | ||
| isSubmit | ||
| ? styles["register-button"] | ||
| : styles["register-button-disabled"] |
| return valid === ""; | ||
| }; | ||
| return { valids, validate }; | ||
| }; |
|
|
||
| export const useDevice = () => { | ||
| const [device, setDevice] = useState(); | ||
| }; |
|
css가 조금 부족하긴 합니다만, tawilnd 쓰시면 조금 편하실건데 내일 멘토링 시간때 논의해봐요! |
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.


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