You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
src 폴더의 첫 번째 자식 폴더는 첫 글자를 소문자로, 단수형으로 한다. (ex. component, asset)
컴포넌트 폴더는 첫 글자를 대문자로 한다. (ex. Button)
구분
컨벤션
예시
component
camelCase
component/template
📄 Files
파일명은 Pascal Case로 생성한다.
Page외 Component는 디렉토리 & index.jsx로 생성한다. (이 경우, 디렉토리가 파일 생성 규칙에 따름)
컴포넌트 폴더 안 파일은 index.jsx로 관리한다.
컴포넌트와 스토리 파일은 반드시 1:1 구조를 가져야 한다.
구분
컨벤션
예시
component
PascalCase
Button/index.jsx
파일 상단 import 문 순서
라이브러리
컴포넌트
상수, 이미지 등의 etc
import styled, { css } from "styled-components";
import PropTypes from "prop-types";
import Side from "./Side";
import { PROFILE_SIZE } from "constant/sizes";