React 7,897 is an open-source (MIT) library for building user interfaces, created at Facebook and now developed by the React Foundation and a large community. It runs in the browser, on the server through Node.js 2,131 , and — via React Native 36,878 — on iOS and Android. It is not a framework: no router, no HTTP client, no opinion about folder layout.
The problem it solves is the one Front-End Web Development leaves you with. Plain DOM code keeps the truth of your interface in the DOM itself, so every state change becomes a list of edits: find the counter, set its text, find the empty-cart message, hide it, enable the checkout button. Miss one edit and the screen disagrees with your data. React inverts that: you write a function returning what the screen should look like for the current data, and React works out the edits.

A component is a function, and given the same props and state it must return the same markup — that is what makes the comparison safe to run whenever React likes. Its return value is neither DOM nor a string: it is a tree of plain objects describing elements, cheap to build and cheap to throw away. React keeps the previous tree, walks both, and produces the shortest list of DOM operations that turns one into the other: reconciliation.
Two consequences follow. Because output depends only on inputs, a component is reusable and testable in isolation. And because React owns the DOM edits, it decides when to make them: batching several state updates into one commit, or deferring a low-priority update so typing stays smooth.