React 개발환경 세팅하기(without CRA) - 3. React 설치하기

정성욱·2019년 11월 27일
0
  1. react, react-dom 설치
npm install --save react
npm install --save react-dom

router 추가 설치시

npm install --save react-router-dom
  1. src/index.js 폴더에 리액트 삽입
import React from 'react';
import ReactDOM from 'react-dom';
const title = 'Hello world!!';
ReactDOM.render(
  <div>{title}</div>,
  document.getElementById('example')
);
  1. npm start 로 확인
profile
Show me the code

0개의 댓글