프로젝트

폴더구조

멘토님이 말씀해 주신 colocation적용.

예) 컴포넌트를 만들 때

네이밍

Untitled

Untitled

컴포넌트 생성

VSCode Extension: ES7+ React/Redux/React-Native snippets

컴포넌트명 폴더 생성 → index.tsx 사용.

export default 컴포넌트명 하단 작성.

rfce 명령어로 컴포넌트 생성.

상단에 import React from 'react' 삭제.

// Hello/index.tsx

// ❎
export default Hello() {
	return <div>Hello</div>
}

// ✅
function Hello() {
	return <div>Hello</div>
}

export default Hello;