Ninja Space Content Tech Blog

Bootstrap and React Update

Posted by Ninja Space Content on Monday, August 9, 2021 Under: react
I'm looking up documentation on React-Bootstrap this morning and I noticed there's an addition in the npm install command. 
It is now:  npm install react-bootstrap@next bootstrap@5.0.2

Before, the documentation didn't mention the "@next part" nor the "@5.0.2". Then, in my main index.js file, I still imported the following at the top:
import 'bootstrap/dist/css/bootstrap.min.css';

It works the same. I am a big fan of the accordian component from bootstrap. So to use that, I just need to import the following at the top of the file where I'm using the component:  import Accordion from 'react-bootstrap/Accordion' and then copy and paste the snippet from bootstrap's official doc.

In : react 


Tags: react bootstrap  react-bootstrap@next bootstrap@5.0.2 

About Ninja Space Content


Ninja Space Content I have been building simple websites on my own since 2008 and currently run several websites at the moment, including this one. I used to be an account manager for an affiliate/e-commerce company, helping affiliates grow their sales so I have some knowledge on the business side and client side of affiliate marketing. Most recently, I decided to complete a JavaScript coding bootcamp and graduated in Dec 2020.
Note: links to resources and promoting special deals may allow me to earn a small commission from each sale.