A blog about using the latest Bootstrap 5 with react JS in CSS style. I am not going to use react-bootstrap as it is still in alpha ( on the day of writing this ).
Create a project
npx create-react-app bootstrap5-react
npm i bootstrap
Installing node sass
Since node-sass is now deprecated, I will be using sass. It solves a common error.
npm i sass
Now in our
src folder, we will create a
main.scss file and add the following overrite to it.
Now, import this scss on top in your index.js file.
I will simply add the following code to show that our bootstrap setup along with variable overite is working correctly.
Run this using
npm start and you will see the output.