In create-react-app, adding Bootstrap 4?

后端 未结 5 1687
迷失自我
迷失自我 2021-02-07 08:01

Since create-react-app hides Webpack config without having to use eject, if I want to use something like reactstrap or react-bootstrap, should I eject or will I be

5条回答
  •  一个人的身影
    2021-02-07 08:52

    There is a project called 'reactstrap' https://reactstrap.github.io/ which has all the steps you need to integrate Bootstrap with React

    npm install bootstrap --save
    npm install --save reactstrap react react-dom
    

    Import Bootstrap CSS in the src/index.js file:

    import 'bootstrap/dist/css/bootstrap.min.css';
    

    Import required reactstrap components within src/App.js file or your custom component files:

    import { Button } from 'reactstrap';
    

提交回复
热议问题