58

React (and Om for cljs) looks extremely appealing but I imagine it is probably not possible to use non-React components e.g. jQuery and jQueryUI ones together with React code on the same page/app.

Can anyone confirm?

KingCode
  • 858
  • 1
  • 9
  • 9
  • 14
    React works within a _virtual_ DOM, so it isn't very useful to manipulate objects on the _actual_ DOM in parallel. In this way, jQuery and others don't play too well with React. However, there are ways of referencing the actual DOM, through `getDOMNode()`, etc that will allow you to integrate your existing jQuery plugins to work with React. See http://facebook.github.io/react/docs/working-with-the-browser.html for more info. – Dave Feb 10 '14 at 09:33

1 Answers1

46

Yes, react can play well with your libraries.

Check out the documentation:Integrating with Other Libraries

Silicum Silium
  • 1
  • 6
  • 19
  • 49
jmingov
  • 12,785
  • 2
  • 32
  • 37
  • 26
    While it *can* play well, you have to be careful, because if your other library happens to modify some part of react-controlled HTML, your app will stop working. You have been warned. – mik01aj Aug 06 '15 at 11:47
  • Additionally, check out [this answer, where I am showing an approach how to use jQuery UI with ReactJS](http://stackoverflow.com/a/40350880/1333836). – Kaloyan Kosev Nov 27 '16 at 22:52
  • @mik01aj Thanks for the warning :) – sotn Jan 24 '17 at 08:21
  • @jmingov Both links are dead. – fabpico Feb 27 '18 at 09:02