Live Today
[React] 첫 프로젝트 만들기 본문
반응형
React 프로젝트 만들기
1. Node.js 설치
2. npm 또는 yarn 설치
3. Visual Studio Code 설치
4. create-react-app으로 프로젝트 만들기
1. Node.js 설치
https://nodejs.org/ko/download/
다운로드 | Node.js
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
nodejs.org
LTS 버전 설치
2. npm과 yarn 차이
- Node.js를 설치하면 Node.js 패키지 매니저 도구인 npm이 설치된다.
- npm으로 수많은 개발자가 만든 패키지를 설치하고 설치한 패키지의 버전을 관리할 수 있다.
- 리액트 역시 하나의 패키지이다.
- yarn은 npm을 대체할 수 있는 도구로 npm보다 더 빠르며 효율적인 캐시 시스템과 기타 부가 기능을 제공한다.
3. 에디터 설치 (Visual Studio Code 설치)
https://code.visualstudio.com/download
Download Visual Studio Code - Mac, Linux, Windows
Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows. Download Visual Studio Code to experience a redefined code editor, optimized for building and debugging modern web and cloud applications.
code.visualstudio.com
4. create-react-app 명령어로 프로젝트 만들기
npx create-react-app 프로젝트 이름
- npx는 npm의 5.2.0 버전부터 새로 추가된 도구
https://create-react-app.dev/docs/getting-started/#npx
Getting Started | Create React App
Create React App is an officially supported way to create single-page React
create-react-app.dev
- npm start
또는
yarn start 로 프로젝트 실행
'React' 카테고리의 다른 글
[React] 면접질문 대비 (0) | 2023.06.21 |
---|---|
[React] 리액트란 ? (0) | 2023.01.24 |