-
Notifications
You must be signed in to change notification settings - Fork 1
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
[#20] 추천 메인 페이지 제작 (미완) #53
Conversation
}; | ||
|
||
const RecommendPreviewCardsOrganism = ({children, data}: PropsWithChildren & Props) => { | ||
return ( |
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.
데이터를 여기서 받으면 좋을 것 같아요 !
<SubHeadline2>{children}</SubHeadline2> | ||
</TitleWrapper> | ||
<RecommendPreviewFourCard data={data} /> | ||
<ButtonWrapper> |
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.
지금 data 라는 props가 organism 컴포넌트에서는 아무 작업도 없고 그저 RecommendPreviewFourCard 컴포넌트로 데이터를 내려주고만 있어서 Props drilling이 발생하는데, organism 레벨에서 데이터 fetch 받으면 안되는 이유가 따로 있을까요??
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.
그런 이유는 없는데.. organism 레벨에서 데이터를 어떤식으로 fetch 받나요?
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.
서로 다른 organism을 만들어야 할 것 같아요
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.
그런 좋은 방법이...!
근데 이건 제가 개인적으로 궁금한건데 이렇게 component 많아져도 되는거죠..? 한페이지 만드는데 ㅋㅋㅋㅋ
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.
Card 4개 뷰는 다른 곳에도 재사용할거라 괜찮을 것 같아요 !
{/*여기 검색창 추가 됩니다.*/} | ||
<RecommendPreviewCardsOrganism data={TestData}>요즘 뜨는 포즈!</RecommendPreviewCardsOrganism> | ||
<RecommendPreviewCardsOrganism data={TestData}> | ||
이벤트 프레임 추천 |
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.
위 방법 대로 라면 data를 props로 넘겨주지 않을 수 있을 것 같슴다
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.
좋습니다 !!
Summary
Comments