Bootstrap Navbar Collapse in ReactJS

Bootstrap is an amazing library and works wonders with ReactJS. Unfortunately, you can’t (or really shouldn’t) use Bootstrap.js with React because bootstrap directly manipulates the DOM; which could break React’s nice rendering flow. This becomes a big problem if you wanted to implement a Navbar using plain bootstrap. Take the following for example from Bootstrap’s documentation:   You could directly take this code and put it in ReactJS (but change class _to _className) and you will have a working Navbar.