1

Since bootstrap library modifies the DOM, it may bring unpredictable behaviour (and difficult bugs to fix) when used along with React. Is it suitable to use bootstrap without including bootstrap.js? What are the downsides?

I understand there is 'react-bootstrap' project, I would rather like to stick with just bootstrap and not add another dependency (if possible).

Thanks for your help.

References:

Advantages of using react-bootstrap over bootstrap

Can we use pure Bootstrap with React.js?

Community
  • 1
  • 1
rsingh25
  • 356
  • 3
  • 9

1 Answers1

1

Yes, it's absolutely fine. You just can't use the default JavaScript-enabled bits of Bootstrap.

(If you end up using react-bootstrap, it'll have React implementations of those things anyway.)

As an aside, since React only modifies the DOM where it's mounted, you can mix and match React and jQuery/Bootstrap's Javascript (or whatever), so long as you take care not to let the other JavaScript touch the bits of DOM that are managed by React.

AKX
  • 152,115
  • 15
  • 115
  • 172