Replies: 1 comment 1 reply
-
|
common/으로 탬플릿 역할 공통 컴포넌트 빼는거 좋네요. common/안에서도 modal/ button/ 이런식으로 폴더 만들어야 하지 않을까 싶네요. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
📌 배운 내용
🔍 배경
모두 리스트페이지에서만 필요하면 모달 공통 컴포넌트를 어떻게 작성해주어야할까? 에 대한 궁금증 발생
✅ 핵심 정리 / 해결 방법
폴더 구조
├── 📁 modal // 모달 공통 컴포넌트
│ ├── Modal.jsx
│ └── modal.styles.js
│ └── index.js
├── 📁 modals // 각각의 모달 내용 컴포넌트
│ ├── CreditChargeModal.jsx
│ ├── CreditLackModal.jsx
│ ├── DonationModal.jsx
│ └── VoteModal.jsx
위와 같은 폴더 구조를 생각했음
추후 공통 컴포넌트(버튼, 라디오, 헤더, 푸터)를 관리할 components/common 폴더에서 관리 예정
├── 📁 common // 공통 컴포넌트
│ ├── Modal.jsx
│ └── modal.styles.js
│ └── index.js
│ └── radioButton.jsx
│ └── customButton.jsx
│ └── ...
├── 📁 modals // 각각의 모달 내용 컴포넌트
│ ├── CreditChargeModal.jsx
│ ├── CreditLackModal.jsx
│ ├── DonationModal.jsx
│ └── VoteModal.jsx
모달 관리
🧠 느낀점 및 생각 메모
ListPage에서 4개의 모달을 관리하는 코드를 어떻게 작성해야 할 지 조금 더 알아보아야겠다.참고 자료
Beta Was this translation helpful? Give feedback.
All reactions