-
Notifications
You must be signed in to change notification settings - Fork 2
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
3주차 미션 - 밍붕 #9
base: main
Are you sure you want to change the base?
The head ref may contain hidden characters: "\uBC0D\uBD95"
3주차 미션 - 밍붕 #9
Conversation
grid-template-areas: 'logo ㆍ ㆍ ㆍ ㆍ ㆍ ㆍ ㆍ ㆍ button'; | ||
grid-template-columns: repeat(10, 1fr); |
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.
😊
<Link to={'/category'}> | ||
<SideMenu> | ||
<MdMovie /> | ||
영화 |
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.
SideMenu 스타일에서 justify-content: space-around;
를 추가하고 width 값을 조정하면  
없이 스타일을 조정할 수 있어요!
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.
감사합니다
import cbr from '../assets/cbr500r.png'; | ||
import ninja from '../assets/ninja.png'; | ||
import rocket from '../assets/rocket.png'; | ||
import r1 from '../assets/r1.png'; |
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.
저는 개인적으로 이렇게 import 문이 길어질 때 정리하고 싶더라구요.. 혹시 민서님도 그렇다면 assets 폴더에 아래처럼 index.js를 추가하고
// index.js
export { default as cbr } from "./cbr500r.png";
export { default as ninja } from "./ninja.png";
export { default as r1 } from "./r1.png";
export { default as rocket } from "./rocket.png";
export { default as watcha } from "./watcha.png";
category.jsx에서는 import { cbr, ninja, r1, rocket } from "../assets";
이렇게 깔끔하게 한 줄로 정리가 가능하답니다!
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.
좋네요 !
let { id } = useParams(); | ||
id = id || 'popular'; |
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.
여기서 id가 falsy한 값을 띄면 'popular'가 할당이 될 거여서 const으로 하는 것이 좋습니다! 혹시 이름이 겹쳐서 고민이시라면 아래처럼도 가능해요!
let { id } = useParams(); | |
id = id || 'popular'; | |
const { id: paramId } = useParams(); | |
const id = paramId || "popular"; |
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.
- let은 지양하시는게 좋지만 사용하게 된다면 특정 함수 내부에서 쓰는 등 specific한 scope에서만 사용하시는 것을 권장드립니다! let에 새로운 값이 할당되는 것을 리액트가 알 수가 없어서 일관된 라이프 사이클 밖에서 움직일 수 있게 되거든요!
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.
수고하셨습니다-! :D
Merge pull request는 모든 리뷰가 완료된 후에 눌러주세요!
1. Add a title
2. Reviewers
3. Assignees
4. Labels