create-react-app2 모바일 웹 SPA 페이지 기본 구성 1. myapp 이라는 이름으로 기본 앱 생성 create-react-app myapp 2. 디렉토리 기본 구성 : src 폴더 아래 components 와 res 를 만들고 res 아래 css 를 만든다. (각 컴포넌트들은 components 에, css는 /res/css 에 위치시킬 예정) 3. 페이지 수정 1) src/index.js 수정 import React from 'react'; import ReactDOM from 'react-dom'; import './res/css/style.css'; import App from './App'; import * as serviceWorker from './serviceWorker'; ReactDOM.render(, document.getElementB.. 2019. 12. 23. React spa 개발환경 설정 (윈도우환경) React spa 개발환경 설정 (윈도우환경) 1. node 설치 - https://nodejs.org/ 에 접속하여 최신 버전 다운로드 / 설치 2. create-react-app 설치 - 윈도우 터미널로 이동하여 아래 명령어로 설치 - npm install -g create-react-app 3. 내 앱 폴더 생성 및 앱 생성 - 윈도우 터미널로 이동(윈도우키+R 누르고 cmd 입력)하여 아래 명령어로 설치 1) d드라이브에 node_app 폴더를 만들고 이 안에 앱들을 생성하려한다. mkdir node_app cd node_app 2) sample 앱 설치 (이름은 자유롭게) create-react-app sample (typescript기반으로 생성하려면 "npx create-react-app s.. 2019. 12. 19. 이전 1 다음