-
Notifications
You must be signed in to change notification settings - Fork 7
라우팅 초기작업 #39
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
라우팅 초기작업 #39
Conversation
feat: 전역 스타일링 설정 및 스타일 관련 util함수 추가와 Label 컴포넌트 마이그레이션
conf: feature 이슈 템플릿 수정
hustle-dev
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.
수고하셨습니다.
|
|
||
| function App() { | ||
| const location = useLocation(); | ||
| const state = location.state as { backgroundLocation?: Location }; |
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.
React Router DOM에서 원래 이런식으로 사용하는 지 궁금합니다!(단언문 형태로)
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.
이 부분은 제가 공식문서의 예제를 보고 참고했습니다.
https://reactrouter.com/docs/en/v6/examples/modal
| import PageNotFound from 'pages/PageNotFound/PageNotFound'; | ||
|
|
||
| function App() { | ||
| const location = useLocation(); |
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.
useLocation으로 반환하는 값이 어떤것이죠?
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.
useLocation은 location 객체를 반환하는데 이런 프로퍼티를 가지고있습니다.
location: {
pathname: string;
search: string;
hash: string;
state: unknown;
key: string;
};
참고링크: https://github.com/remix-run/history/blob/main/docs/api-reference.md#location
PR Type
What kind of change does this PR introduce?
Related Issues
#31
What does this PR do?
Layout 만들기
Home 만들기
Search 만들기
MyRecipes 만들기
PageNotFound 만들기
Modal 만들기
라우팅
Other information