-1

I'm building a web application using ReactJS.

I would like to know if it's a good idea to combine React and Bootstrap or if it's completely useless? Are there things I can do with one and I can't do with the others? I know that Bootstrap is a Framework and React is a library but I'd like to know what's the difference between the two, since I read some articles explaining the difference between a library and a framework and couldn't really understand!

Cœur
  • 37,241
  • 25
  • 195
  • 267
Hiimdjango
  • 431
  • 5
  • 21

3 Answers3

1

I would recommend going through this tutorial: https://ourcodeworld.com/articles/read/561/how-to-use-components-of-bootstrap-4-in-reactjs

Basically, they aren't meant for the same purpose: you can write the business logic (~how your app will work) in ReactJS and then you can show it to the end user with some custom CSS class magic written in Bootstrap 4.

Hope that helps!

gabriella-varga
  • 371
  • 2
  • 4
  • 15
1

The difference between a library and a framework is explained really well in the following Stackoverflow post: What is the difference between a framework and a library?

If you want to use Bootstrap 4 in ReactJS you can use the following super easy and nice to use library: Reactstrap.

I hope this helps you.

KittyCat
  • 415
  • 4
  • 9
  • 26
0

Bootstrap is a CSS framework, It is used to make responsive and beautiful websites.

React js is a view library and makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes.

You can use them together if you want to build interactive and beautiful websites.

To include bootstrap in React,

First refer this, Bootstrap webpack

This is one way of using bootstrap in reactjs projects.

The advantage of this is that you get access to latest bootstrap css.

The disadvantage of using this is its complicated to use jquery plugins in reactjs. However if you are only interested in css, then it's perfect.

Using this you can directly use bootstrap classes from documentation and get more control. Just use className instead of class

If you want simple setup, then you can use reactstrap link

Other frameworks include react-bootstrap link

This does not mean, that you have to use bootstrap only. You can use any other css framework like Bulma, Foundation etc.

Is it worth it using jQuery with React ?

My opinion is not to use jQuery with React, as jQuery or jQuery plugins changes DOM structure, This in turn causes problems with reactjs virtual DOM.

This does not mean you cannot use jQuery, you can, but its little different than normal use.

Reactjs has provided a way to use jQuery and other plugin here Integrating with Other Libraries

Community
  • 1
  • 1
Gautam Naik
  • 8,990
  • 3
  • 27
  • 42