컴포넌트 선언 방식 (함수 선언문 vs 표현식)
// 2. 함수 선언문
const Component: React.FC<Props> = () => { return ... };
export default Component;
Props ( type vs interface vs inline ) + 네이밍
interface ButtonProps {}
Hooks
const [data, setUser] = useState(0);
Ref ( RefObject vs MutableRefObject )
const inputRef = useRef<HTMLInputElement>(null); // RefObject
제너릭 컨벤션
const customFetch = <URL, OPTIONS>(url: URL, options: OPTIONS) => { ... }
타입 네이밍 컨벤션
type ApiType = { ... } // 전자
type Api = { ... } // 후자
type import / export
// 컴포넌트
const Component = () => {};
export default Component;
// 나머지
export const useCustomHook = () => {};
import { ApiType } from "./"
export type { ApiType }; // 후자