Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between React.js and jQueryUI widget factory

I've been reading about react.js library from Facebook lately, but I cannot see any difference between React and jQueryUI widget factory. Can someone make comparison between the two and tell me why should I use react.js instead of jQuery widget factory ?

Thanks

like image 412
Tjodalv Avatar asked Feb 09 '15 09:02

Tjodalv


1 Answers

They aren't comparable, as they solve vastly different problems. jQueryUI widget factory is more a stateful wrapper around manipulating the dom with jquery. Not much different than writing objects where your render/update calls do jQuery DOM operations. ReactJS is more about 1 directional data flow & rendering. So when the state changes, it makes it all the dom changes behind the scenes on its virtual dom. Then diffs the updates to the real dom. Making it to be very fast, and very clean.

I've been learning React.js for a couple of months now, and my number 1 reason to use React.js is because of how it forces you to structure things. Keeping components self contained, and only manipulating the output by changing a state is vastly powerful. I've also come to like the Flux pattern, with the one direction of data flow.

like image 157
agmcleod Avatar answered Oct 14 '22 14:10

agmcleod