React/Lecture
[React] (2)react-bootstrap 설치
오늘도 코딩하나
2024. 5. 24. 16:32
1. react-bootstrap
https://react-bootstrap.netlify.app/docs/getting-started/introduction
(1) react-bootstrap 설치
npm install react-bootstrap bootstrap
(2-1) index.html - <head> 안에 import 시켜주기
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN"
crossorigin="anonymous"
/>
(2-2) App.js
import 'bootstrap/dist/css/bootstrap.min.css';
-> 2-1 / 2-2 중에 하나의 방법으로 하면 된다.
** bootstrap vs react-bootstrap
- bootstrap : 상태값과 클래스를 사용
- react-bootstrap : function과 hooks 사용