When comparing Bootstrap vs React, the Slant community recommends Bootstrap for most people. In the question“What is the best CSS framework?” Bootstrap is ranked 2nd while React is ranked 18th. The most important reason people chose Bootstrap is:
Ranked in these QuestionsQuestion Ranking
Pro Consistency across browsers
Pro Responsive design philosophy
Bootstrap is developed to be instantly compatible with all sizes of screens, so you don't have to worry about which device the user is accessing your site from. Yet if you prefer, you can disable responsiveness of Bootstrap.
Pro Well documented
Documentation is thorough, well organized and full of live examples and templates ready for use. Every component and every part of the framework is explained and covered in depth.
Pro Designed to get a site running quickly
Bootstrap is designed to get a site up and running quickly. Each of it's components is pre-configured to help with getting a site up and running quickly.
Pro Great community
Bootstrap is very popular and has a large community. As a result of this it is much easier to find help with anything you might need. This also gives you a treasure trove of prebuilt components to use and add to your site.
Pro Supports responsive embeds
Allows easily adding responsiveness to
Pro Easily make professional looking websites
Bootstrap makes it easy to learn how to make professional looking websites. It can even make code junkies semi-enjoy design.
Pro Custom builds
Bootstrap can be customized in a variety of ways. Either by overriding the default CSS styles with new CSS styles or by editing the
.scss Bootstrap files.
Pro A wide variety of themes available
To help you avoid the "Bootstrap look", there are many resources that provide a great selection of themes and templates for Bootstrap.
Pro One of the most popular ones
Ranked on GitHub as the most starred CSS repository.
Pro Easy to reuse components
Pro Server side rendering
React can render it's components and data server side, then it sends those components as HTML to the browser.
This ensures faster initial loading time and SEO friendliness out of the box, since it's indexed as any other static website by search engines.
Pro Virtual DOM support
Instead of relying on the DOM, React implements a virtual DOM from scratch, allowing it to calculate precisely what needs to be patched during the next screen refresh. This is orders of magnitude faster than fiddling with the DOM itself.
Pro One-way data flow
React's one-way data binding (or one-way data flow) means that it's easy to see where and how your UI is updated and where you need to make changes. It's also very easy to keep everything modular, fast and well-organized.
Pro Supported by Facebook and Instagram
React is built by Facebook engineers initially to be used only for their inner projects especially to solve the problem of building large complex applications with constantly changing data.
Pro Can be used with different libraries
Pro Template engine independent
React provides a template engine (JSX) which is easy to use. But it's not mandatory.
Pro Functional programming style leads to less buggy UIs
Pro Easy to write tests
Pro Good debugging tools
React has an official Chrome Extension which is used as a developing and debugging tool. It can be used to quickly and painlessly debug your application or view the whole application structure as it's rendered.
Pro Flux architecture pattern
Flux is a platform agnostic pattern which can technically be used with any application or programming language.
One of Flux' main features is that it enforces uni-directional data flow which means that views do not change the data directly.
With React this is useful because this way it's easier to understand an application as it starts getting more complicated. By having two-way data binding, lead to unpredictable changes, where changing one model's data would end up updating another model. By using the Flux architecture, this can be avoided.
Pro Extensive SVG support
Since React v0.15, SVG is fully supported. React supports all SVG attributes that are recognized by today's browsers.
Pro Keep control over your app's logic
React is just a view library, so you still have (almost) full control over how your app behaves.
Pro Supported by ClojureScript libraries
Reagent, Om, Rum, etc.
Pro Tested on Facebook itself
React is used on one of the most visited websites on the planet, Facebook. With stellar results and with millions of people experiencing it every day.
Con Large file size out of the box
Bootstrap has an out-of-the box filesize of ~276K, which is pretty large considering it's just CSS. Most of those styles aren't even used in 90% of web pages built with Bootstrap. By only including the required styles it can be trimmed by 70%-75%.
Con Websites can start to look the same
If the initial Bootstrap colors and styles are not changed or edited, different websites start looking the same even if they have nothing to do with each other and they are made by different developers.
Con Too many classes
Bootstrap's over-reliance on HTML classes for styling can get very messy very quickly. There's also an overabundance of DOM elements which have a lot of classes and are more often than not nested inside DOM elements with even more classes. This gets problematic down the line because the maintainability of the project gets harder when the project starts to get large.
Con Hard to customise
It's quite hard to customise Bootstrap using pre-processors like SASS and LESS, the only real flexibility is with typography and colours.
Con Heavy on memory
React's virtual DOM is fast, but it requires storing elements in the virtual and real DOM increasing memory usage for the page. This can be a real problem for single-page webapps designed to be left running in the background.
Con Template(view) mixed into code
Con You have to learn a new syntax
Requires learning a custom syntax, JSX, that has some gotchas and introduce complexity, a steeper learning curve, and incompatibility with other tools.
Though you can opt out from JSX and use vanilla JS instead. But that is not recommended since it adds a lot of unneeded complexity which JSX tries to avoid.
Con Not a complete solution
React does not do everything for the developer, it's merely a tool for building the UI of a web app. It does not have support for routing or models, at least not out of the box. While some missing features can be added through libraries, to start using React and use it in production, you still would need to have experience, or at least a good grasp on what the best libraries to use would be.
Con Large file size
react.min.js is 145.5KB in size. It's much larger than some other libraries that offer roughly the same features and it's almost the same size as some MV* frameworks such as Angular or Ember that offer more features out of the box.
Although, it should be mentioned that sometimes having a smaller library may force developers to reinvent the wheel and write inefficient implementations on features that React already has. Ending up with a larger application that's harder to maintain and/or that has bad performance.
Con Renders too frequently
Con No support for legacy browsers
React has recently dropped support for Internet Explorer 8. While the library may still work on IE8, issues that affect only IE8 will not be prioritized and/or solved.