React
A JavaScript library for building screens out of reusable pieces called components.
React is a JavaScript library for building user interfaces, created at Facebook and released as open source in 2013. Instead of writing one big page, you build small components: a button, a comment, a product card. Each one is a function that takes some data and returns what should appear on screen, and components nest inside each other to make whole apps.
The key idea is that you describe what the screen should look like for the current data, and React works out what to change. When something happens, like a new message arriving or a like being added, you update the data, called state, and React redraws only the parts of the page that depend on it. Components are usually written in JSX, a syntax that mixes HTML-like tags into JavaScript.
React is one of the most widely used tools for frontend work, and a large ecosystem has grown around it. Frameworks like Next.js add routing and server rendering on top, and React Native uses the same ideas to build mobile apps. React itself is a library, not a full framework, so teams still choose other pieces, such as how to fetch data or handle forms.
Keep in mind
- React builds interfaces out of reusable components.
- You change the data (state) and React updates the screen to match.
- JSX lets you write HTML-like tags inside JavaScript.
- Created at Facebook, it is open source and maintained by Meta.