Adding Bootstrap

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 is the most popular option that strives for complete parity with Bootstrap. reactstrap is also a good choice for projects looking for smaller builds at the expense of some features.

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:

npm install --save bootstrap

Import Bootstrap CSS and optionally Bootstrap theme CSS in the beginning of your src/index.js file:

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

Si se desea poner una versión específica, añadir el número de la versión tras @ en el comando:

npm install --save bootstrap@3

Press "Ctrl + Enter" to see in full screen


Author: djalho
Created: 4 June 2019
Last edition: 29 August 2019

Comments (0)