Can we use pure Bootstrap with React.js?

I would like to convert websites from a PSD prototype to HTML / CSS / Bootstrap, and then move on to JavaScript development and use React.js and some JavaScript encoding.

Is it possible to use pure Bootstrap with React.js without using React-Bootstrap?

Is it also possible that the Freelancer HTML / CSS can only execute React-Bootstrap as a layout, and then find a JavaScript developer to do some preliminary work like React.js and JS?

I would like to develop a desktop application using Electron and Hybrid using the same code as possible.

+6
source share
2 answers

In theory, yes. Since ReactComponent render itself as html, you can just put the correct css classes and there you go. This is very good for the CSS loading part.

BUT , all javascript materials made by the bootstrap library that modify the DOM will conflict with the virtual DOM of React. One way to avoid this is to never restart the reaction component for which its internal html is modified by loading (by setting shouldComponentUpdate() { return false } ). So you can think of React as a template library to generate some HTML markup, and let the boot block actively modify that markup for you, but that's not what React is for.

The whole point of React is the ability to see your user interface as a function of your state: view = f(state) at any time. Therefore, react-bootstrap reuses all DOM modifications in React mode.

+7
source

Of course you can. I will include bootstrap css as a CDN and go with normal development.

0
source

All Articles