1. Node.js 설치
# Ubuntu/Debian
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
# macOS (Homebrew)
brew install node
# Windows
choco install nodejs
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
# macOS (Homebrew)
brew install node
# Windows
choco install nodejs
2. React 프로젝트 생성
Create React App
npx create-react-app my-react-app
cd my-react-app
npm start
cd my-react-app
npm start
Vite 사용 (더 빠름)
npm create vite@latest my-react-app -- --template react
cd my-react-app
npm install && npm run dev
cd my-react-app
npm install && npm run dev
3. VS Code 설정
필수 확장 프로그램
- ES7+ React/Redux/React-Native snippets
- Prettier - Code formatter
- ESLint
- Auto Rename Tag
- React Developer Tools (브라우저)
4. 유용한 패키지
# 라우팅
npm install react-router-dom
# HTTP 클라이언트
npm install axios
# UI 라이브러리
npm install @mui/material
# 상태 관리
npm install redux react-redux
npm install react-router-dom
# HTTP 클라이언트
npm install axios
# UI 라이브러리
npm install @mui/material
# 상태 관리
npm install redux react-redux