Introduction
In this blog, you will learn to install bootstrap in your React application. We will see how to use bootstrap in React.
What is bootstrap?
Bootstrap is a free front-end framework for faster and easier web development; Bootstrap includes HTML and CSS-based design templates.
Step 1
Create a brand new react application or open an existing one. Open the terminal in Visual Studio Code or in the command prompt and follow the below steps.
- E:\REACT PROJECTS>npx create-react-app counter-app
- E:\REACT PROJECTS>cd counter-app
- E:\REACT PROJECTS>npm install bootstrap –save
- E:\REACT PROJECTS\counter-app>code .
If you are in Visual Studio terminal, follow the below steps:
- PS E:\REACT PROJECTS\counter-app>
- npm install bootstrap –save
Step 2
Now register your bootstrap and font-awesome in Index.js which is located under the src folder of your application.
- import React from "react";
- import ReactDOM from "react-dom";
- import "./index.css";
- import App from "./App";
- import * as serviceWorker from "./serviceWorker";
- import bootstrap from "bootstrap/dist/css/bootstrap.min.css";
- ReactDOM.render(
- <React.StrictMode>
- <App />
- </React.StrictMode>,
- document.getElementById("root")
- );
- serviceWorker.unregister();
Step 3
Open App.js and modify it as shown below.

Laxmidhar SahooPosted Jul 19, 2020, 3:28 AM
Thanks for the useful information
Sanaya SethPosted Jul 18, 2020, 7:22 AM
Thank you for sharing the information.