Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do we need reactjs-bootstrap if there's easy way?

I've been developing web app using react or angular but I'm confused why people would use library like react-bootstrap (https://react-bootstrap.github.io/introduction.html) or Angular-bootstrap? Because when I create I just have to load the css framework using link tag with its corresponding js lib, then in reactjs side, I just have to put the classes needed for a component. Isn't that sounds easier?

Thanks,

like image 847
user3856437 Avatar asked Oct 17 '22 05:10

user3856437


1 Answers

It has to do with the Javascript portion of Bootstrap. The CSS will work just fine with a link tag.

But React and Angular are Javascript libraries which have a lot under the hood for manipulating the DOM. If you also use something like Bootstrap or jQuery to manipulate the DOM, it probably won't play well with React or Angular since they're trying to do similar things in very different ways maybe at the same time. So DOM-related Javascript libraries need to be rewritten so they play nicely with React/Angular.

From the react-bootstrap docs:

we don't ship with any included css

All they deal with is the JS.

like image 171
Andrew Harris Avatar answered Oct 27 '22 09:10

Andrew Harris