site_link1 | https://medium.com/@shubhamnagar234/crea...501aa9d9f1 |
---|---|
site_link2 | https://react-bootstrap.github.io/ |
site_link3 | https://github.com/react-bootstrap/code-sandbox-examples |
출처는 site_link1
- https://nodejs.org 방문하여 Node.js 설치
- 적당한 폴더를 생성하여 cmd 에서 'npm install -g create-react-app' 실행
- npm 버전업이 필요하다고 하면 가르쳐 주는대로 'npm install -g npm@11.2.0' 명령어 실행
- 설치가 완료되면 다시 'npm install -g create-react-app' 실행
- 완료되면 'npx create-react-app hello-world' 실행
- 'hello-world' 폴더가 생성되었다면 폴더 안으로 들어가서 'npm start' 실행
- 웹서버와 브라우저가 자동 실행되며 'http://localhost:3000' 으로 페이지가 오픈된다.
- 이후 'hello-world/src/App.js' 파일을 에디터로 열어서 다음과 같이 App() 함수의 내용을 수정
function App() {
return (
<div className="App">
<h1>Hello React!</h1>
</div>
);
}
- 파일을 저장하면 브라우저가 자동 갱신되며 'Hello React!' 가 출력된다.