Skip to content

Commit e7b975e

Browse files
jquenseiansu
authored andcommitted
Generalize the Bootstrap documentation (#5631)
* Generalize the adding bootstrap documentation * Update adding-bootstrap.md * Update adding-bootstrap.md * Update adding-bootstrap.md
1 parent 42a1b5a commit e7b975e

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

docusaurus/docs/adding-bootstrap.md

+4-12
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ id: adding-bootstrap
33
title: Adding Bootstrap
44
---
55

6-
You don’t have to use [reactstrap](https://reactstrap.github.io/) together with React but it is a popular library for integrating Bootstrap with React apps. If you need it, you can integrate it with Create React App by following these steps:
6+
While you don’t have to use any specific library to integrate Bootstrap with React apps, it's often easier than trying to wrap the Bootstrap jQuery plugins. [React Bootstrap](https://react-bootstrap.netlify.com/) is the most popular option, that strives for complete parity with bootstrap. [reactstrap](https://reactstrap.github.io/) is also a good choice for projects looking for smaller builds at the expense of some features.
77

8-
Install reactstrap and Bootstrap from npm. reactstrap does not include Bootstrap CSS so this needs to be installed as well:
8+
Each project's respective documentation site has detailed instructions for installing and using them. Both depend on the Bootstrap css file so install that as well:
99

1010
```sh
11-
npm install --save reactstrap bootstrap@4
11+
npm install --save bootstrap
1212
```
1313

1414
Alternatively you may use `yarn`:
1515

1616
```sh
17-
yarn add bootstrap@4 reactstrap
17+
yarn add bootstrap
1818
```
1919

2020
Import Bootstrap CSS and optionally Bootstrap theme CSS in the beginning of your `src/index.js` file:
@@ -25,14 +25,6 @@ import 'bootstrap/dist/css/bootstrap.css';
2525
// components takes precedence over default styles.
2626
```
2727

28-
Import required reactstrap components within `src/App.js` file or your custom component files:
29-
30-
```js
31-
import { Button } from 'reactstrap';
32-
```
33-
34-
Now you are ready to use the imported reactstrap components within your component hierarchy defined in the render method. Here is an example [`App.js`](https://gist.githubusercontent.com/zx6658/d9f128cd57ca69e583ea2b5fea074238/raw/a56701c142d0c622eb6c20a457fbc01d708cb485/App.js) redone using reactstrap.
35-
3628
## Using a Custom Theme
3729

3830
> Note: this feature is available with `react-scripts@2.0.0` and higher.

0 commit comments

Comments
 (0)