-
Notifications
You must be signed in to change notification settings - Fork 16
프론트엔드 코드 컨벤션
mat edited this page Jul 13, 2022
·
1 revision
- %, vh, vw
- width
- height
- px
- border-radius
- border-width
- box-shadow
- rem
- font-size
- width
- height
- padding
- margin
- grid-gap
- 리액트 관련
- 외부 라이브러리 (@emotion/ …)
- react hook
- custom hook
- types
- style
- component
- atomic
- middle
- page
- constants
- util
- api
컴포넌트는 function, 나머지는 화살표 함수
- 단위
- 페이지 (도메인 포함) - 중간 컴포넌트 (도메인 포함) - 아토믹 컴포넌트 (도메인 없음)
- 분리 기준
- ui의 재사용 + 도메인
components/
@common
… components ⇒ PascalCase
pages/
- 컴포넌트 이름/
- 컴포넌트.tsx
- 컴포넌트.style.ts
- 컴포넌트.stories.tsx