Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does react.js play nice with jQuery/UI components [closed]

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?

like image 278
KingCode Avatar asked Jan 09 '14 20:01

KingCode


People also ask

Is it good to use jQuery with ReactJs?

It's a bad practice because React uses a concept called a Virtual DOM instead of a real DOM. And React isn't aware of the changes made outside of this Virtual DOM. When you use jQuery or any other library that manipulates the DOM, React gets confused.

How use jQuery ui With React?

Use React lifecycle methods to initialize and tear down the jQuery plugin; Use React props as plugin configuration options and hook up to plugin's methods events; Destroy the plugin when component unmounts.

Can you use both jQuery and React?

No. No approach is correct and there is no right way to use both jQuery and React/Angular/Vue together. jQuery manipulates the DOM by, for example, selecting elements and adding/deleting stuff into/from them.

Is React really better than jQuery?

While jQuery is a fine choice for simple web building, using animations and effects, React helps you perform more sophisticated functions and principally highlights UI development, DOM manipulation and the likes.


1 Answers

Yes, react can play well with your libraries.

Check out the documentation:Integrating with Other Libraries

like image 58
jmingov Avatar answered Nov 04 '22 10:11

jmingov