2021. 4. 4. 19:25ㆍ서버 프로그래밍
오랜만에 React 프로젝트를 만들려고 하면 매번 까먹다보니 정리를 해본다.
기본적으로 간단한 React 프로젝트의 경우, 개인적으로 UI는 reactstrap으로, 라우팅은 react-router-dom으로, 비동기 통신은 axios를 사용하고 있다.
이정도면 간단하게 RESTful API와 연동되는 관리자 페이지 정도는 뚝딱뚝딱 만들어냏수 있기 때문이다.
1. Node.js 설치
2. React 프로젝트 만들기
npx create-react-app my-app
cd my-app
npm start
ko.reactjs.org/docs/create-a-new-react-app.html
새로운 React 앱 만들기 – React
A JavaScript library for building user interfaces
ko.reactjs.org
3. Reactstrap 설치
npm install --save bootstrap
npm install --save reactstrap react react-dom
reactstrap - React Bootstrap 4 components
Installation NPM Install reactstrap and peer dependencies via NPM npm install --save reactstrap react react-dom Import the components you need Danger! import React from 'react'; import { Button } from 'reactstrap'; export default (props) => { return ( Dang
reactstrap.github.io
4. React router dom 설치
npm install react-router-dom
reactrouter.com/web/guides/quick-start
React Router: Declarative Routing for React
Learn once, Route Anywhere
reactrouter.com
5. axios 설치
npm install axios
axios/axios
Promise based HTTP client for the browser and node.js - axios/axios
github.com