Install Bootstrap to Reactjs App in 4 simple steps

Kibikukimani
Aug 10, 2022
Add React-bootstrap to your react project
  1. Run on your project terminal
npm install react-bootstrap bootstrap

2. Add the line below in your index.js file.

import ‘bootstrap/dist/css/bootstrap.min.css’;

3. Stop and re-run your development server

4. Use bootstrap in your code

import './App.css';import { Button } from 'react-bootstrap';function App() {return (<>
<div className="App">
<Button variant="primary" type="submit">Submit</Button></div></>);}export default App;

--

--

Kibikukimani

Kibiku is a Software Engineer fascinated by all things tech, striving to be a master of best Software Engineering principles and best practices of writing code