-
Notifications
You must be signed in to change notification settings - Fork 0
파일 컨벤션
MinCheol Cha edited this page Apr 4, 2021
·
6 revisions
- 라이브러리
- 컴포넌트
- 공통 컴포넌트를 import 할 경우 위 순서대로
- Atoms
- Molecules
- Organisms
- 공통 컴포넌트를 import 할 경우 위 순서대로
- api 함수
- custom hooks
- store
- utils 함수
- 그외
- 같은 레벨에 있는 파일인 경우, 알파벳 순서대로 배치
- ex) React, Redux, Atoms/Input, Atoms/Button, Molecules/Hashtags, Organisms/Modal, 게시글 GET api, custom hooks, store 파일을 import 할 경우
import React from "react";
import Redux from "redux";
import Button from "Components/Atoms/Button";
import Input from "Components/Atoms/Input";
import HashTags from "Components/Molecules/HashTags";
import Modal from "Components/Organisms/Modal";
import getArticles from "Components/Apis/getArticles";
import useDecouned from "Hooks/useDebounced";
import markDownStore from "Store/MarkDown";
- React.FC를 사용하지 않음
export interface Props {
className?: string;
index: string;
status: "success" | "error";
text: string;
}
const Alert = ({ className, index, status, text }: Props) => {
......
}
return (
<>
......
</>
)
- position
- display
- width, height
- top, right, bottom, left
- padding, margin
- border
- 그외