React is a JS library you use to create UIs. So in that sense it’s like jQuery. However, it does some very smart stuff to make UI development better:
-
Instead of directly editing the DOM (the page) every time you want to change the way something looks, React uses a virtual DOM (basically a big JS object that represents the whole page) which it can edit super fast and only “publish” its changes to the real DOM when everything is ready. This way you don’t make five little changes causing five redraws of the page; you batch your changes together so the browser only has to redraw once. Fast.
-
It lets you write independent components which can easily be combined to build pages. One benefit of this is consistency.
-
It forces you to treat data with care. Data is supposed to only flow from parent components to children. This makes it much harder to cause problems where the state of a particular part of your application is being influenced by the outside world.
-
It encourages immutability, which in turn makes stuff easier to test, less bug-prone, and so on.