JS
리액트, MUI, 아이콘 라이브러리
삑삑도요
2023. 4. 2. 17:45
리액트 설치 및 시작
1. 시작하기
node.js (https://nodejs.org/ko)
- LTS 버전 다운받아서 설치하기
- 설치 후 cmd에서 node --version / npm --version 명령어 입력하여 정상설치 여부 확인
yarn (https://classic.yarnpkg.com/en/docs/install#windows-stable)
- npm install -global yarn
- 설치 후 cmd에서 yarn --verision 명령어 입력하여 정상설치 여부 확인
2. 리액트 프로젝트 시작하기
- vscode의 경우 프롬프트를 바꾸어 진행할 것
- npx create-react-app 프로젝트명
- npx create-react-app .(현재경로)
3. 개발용 서버 실행하기
- npm start
4. 실행중인 서버 종료하기
- ctrl + c
5. 프로젝트 빌드
- npm run build
6. 빌드한 프로젝트 실행
- npx serve build
MUI 설치방법 (https://mui.com/)
- npm install @mui/material
- npm install @mui/material @emotion/react @emotion/styled
리액트 아이콘 라이브러리 (https://react-icons.github.io/react-icons/)
- npm install react-icons --save
- yarn add react-icons