What is React, and why is it used?

React is a JavaScript library developed by Facebook for building user interfaces, especially for single-page applications. It’s used because it allows developers to create reusable components, making it easier to manage large applications. React also uses a virtual DOM for efficient updates, improving performance by only re-rendering components when necessary.