더북(TheBook)

이렇게 명령어를 입력하고 나면 다음과 같은 결과가 터미널에 나타납니다.

$ yarn create react-app hello-react
yarn create v1.12.3
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "create-react-app@3.0.0" with binaries:
    - create-react-app
 
Creating a new React app in /Users/velopert/playground/react/hello-react.
 
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
 
yarn add v1.12.3
[1/4] Resolving packages...
[2/4]  Fetching packages...
[3/4] Linking dependencies...
(...)
[4/4]   Building fresh packages...
(...)
Done in 9.45s.
 
Initialized a git repository.
 
Success! Created hello-react at /Users/velopert/playground/react/hello-react
Inside that directory, you can run several commands:
 
yarn start
  Starts the development server.
 
yarn build
  Bundles the app into static files for production.
 
yarn test
  Starts the test runner.
 
yarn eject
  Removes this tool and copies build dependencies, configuration files
  and scripts into the app directory. If you do this, you can't go back!
 
We suggest that you begin by typing:
 
cd hello-react
yarn start
 
Happy hacking!
Done in 16.58s.

노트 yarn을 사용하지 않는 경우

yarn을 사용하지 않는 경우라면 다음 명령어를 사용하여 리액트 프로젝트를 생성할 수 있습니다.

$ npm init react-app <프로젝트 이름>
신간 소식 구독하기
뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.