forked from codesquad-members-2023/issue-tracker
-
Notifications
You must be signed in to change notification settings - Fork 2
snoopso edited this page May 13, 2023
·
12 revisions
-
jest
: 테스트 코드 작성을 위해 사용 -
react
: SPA 구현 및 효율적인 State 관리를 위해 사용 -
eslint
,prettier
: 협업을 위해 일관성 있는 코드 스타일을 유지하고 코드의 품질을 향상시키기 위해 사용 -
react-app-rewired
: React.js의 webpack 설정을 변경해 절대경로를 지정해주기 위해서 사용 -
css-module
: 클래스 이름의 충돌을 방지하고, 모듈로 css를 관리하여 중복 코드를 방지하기 위해 사용 -
msw
: 백엔드 API 통신 전 Mock API를 제작해 사용하기 위해 사용
{
title: string,
comment: Comment[],
writer: Member,
assignee: Member | null,
label: Label | null,
milestone: MileStone | null,
status: 'open' | 'close',
editedTime: Date,
index: number,
}
{
id: string,
profile: string,
name: string,
}
{
title: string,
description: string,
backgroundColor: string,
textColor: string
}
{
id: string,
title: string,
endDate: Date,
contents: string,
totalIssueNum: number,
closedIssueNum: number,
isClosed: boolean
}
{
writer: User,
contents: string,
editedTime: Date,
}
frontend/
├── public/
├── src/
│ ├── assets/
│ │ └── ...
│ ├── components/
│ │ ├── Heade/
│ │ │ ├── Header.jsx
│ │ │ └── Header.module.css
│ │ └── ...
│ ├── containers/
│ │ ├── MainPage/
│ │ │ ├── MainPage.jsx
│ │ │ └── MainPage.module.css
│ │ └── ...
│ ├── services/
│ │ ├── issue/
│ │ │ ├── issue.js
│ ├── utils/
│ │ ├── helpers.js
│ │ └── ...
│ ├── assets/
│ │ ├── images/
│ │ └── icons/
│ ├── App.js
│ ├── App.module.css
│ ├── index.js
│ └── index.module.css
├── .gitignore
├── package.json
└── README.md
- components: 재사용 가능한 컴포넌트를 저장
- containers: 각 페이지 또는 뷰에 해당하는 컨테이너 컴포넌트를 저장
- services: API 호출, 인증, 데이터 처리 등의 서비스 로직을 포함하는 파일을 저장
- utils: 프로젝트 전반에 걸쳐 사용되는 유틸리티 함수와 도구를 저장
- assets: 이미지, 아이콘, 폰트 등의 정적 리소스를 저장
- 표현식 함수 및 람다 표기법을 사용합니다. 그리고 props는 구조 분해할당을 사용합니다.
const Button = ({name, _onClick}) => {
...
}
- 스타일 제어는
css-modules
,classnames
라이브러리를 활용합니다. 클래스를 부여할 때 클래스를 여러 개 적용해야 할 경우 다음과 같이 변수로 지정하여 넣도록 합니다.
...
import styles from './Button.module.css';
import classNames from 'classnames/bind';
export const Button = () => {
const cx = classNames.bind(styles);
const buttonClassNames = `${cx('color-primary')} ${cx('color-primary')}`;
return <button className={buttonClassNames}><button>
}
...
.color-blue {
background-color: var(--color-light-accent-background);
}