반응형
리액트세팅
-
리액트 설치 및 세팅프레임워크/리액트 React 2023. 1. 14. 17:49
1. 리액트 설치 및 세팅 우선 node.js 최신 버전을(왼쪽 안정화 버전 사용) 다운받아야 함 node.js 버전 확인은 터미널을 연 후 (ctrl + `) npm -v 작업할 폴더를 만든 후 powershell에서 프로젝트를 생성한다. (Create React App을 생성) 리액트 앱을 생성하는 방법은 npm과 npx 방식이 있는데, npm은 프로그램을 설치 npx는 프로그램을 임시로 설치한다.공식 문서에서는 npx 방식을 권장하며, npx는 컴퓨터 공간을 낭비하지 않고, 최신 버전을 유지할 수 있도록 해주는 장점이 있다. npx create-react-app blog //blog대신 임의의 프로젝트명을 입력해도 됨 //npm install -g create-react-app //create-re..