React를 사용하기 위해선 반드시 node.js가 필요하다.
node.js 홈페이지 > https://nodejs.org/en/
Node.js
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
nodejs.org
IDE 는 VSCode를 사용했다.
VSCode 홈페이지 > code.visualstudio.com/
Visual Studio Code - Code Editing. Redefined
Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications. Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.
code.visualstudio.com
React를 유용하게 사용하기 위해선 몇가지 Extensions가 필요하다.
* ESLint : 자바스크립트 문법 및 코드 스타일을 검사하는 플러그인
* Reactjs Code Snippets : 리액트 컴포넌트, 라이프 사이클 함수 작성 시 단축 단어를 사용해 코드를 자동 생성하는 코드 스니펫 모음 플러그인
* Prettier-Code formatter : 코드 스타일을 자동으로 정리해주는 플러그인
* npm : VSCode에서 npm을 서포트 해주는 플러그인
React 프로젝트 생성하기
npm install -g create-react-app
// 프로젝트 생성
create-create-app 프로젝트 이름
// 서버 시작
npm start
React 서버 시작 결과