1. License
“without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software”
MIT allows use in paid and closed-source products.
github.com/react/react/blob/main/LICENSE3. Used by agents' projects
Dependency in 2,038 public GitHub projects set up for AI coding agents that we scanned (32.6%).
4. Agent access
Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.
react.dev/llms.txtFrom the package registry and GitHub, checked daily; card checked Nov 10, 2026. Tap a verdict to see its source.How we checkedReport an error
What React does
React is a free JavaScript library for building the parts of a web page people click and type into, from one button to a whole app. You describe each piece once, such as a plan card or a search box, and React updates the screen when the data changes. Routing, data loading and hosting come from a framework built on it, such as Next.js.
What people build with it
Buttons and forms that react to clicks
A counter, a like button or a form that shows errors while someone types; the screen changes as soon as the data does.
A pricing page with a yearly switch Idea
Visitors flip between monthly and yearly prices and pick a plan; the cards and the summary line update at once.
Add a widget to an existing site
Your site is built with Rails, Django or plain HTML; React runs only inside one box on the page, such as a calculator or a booking form.
A whole web app or site
For a new app with many pages, sign-in and data, start from a React framework that adds page routing and loading.
Reuse the same piece everywhere
A product card, a price tag or a sign-up box is written once and used on every page, so a change shows up everywhere.
Phone apps from the same skills
The same component style also builds iPhone and Android apps through React Native, so a web team can make a mobile app.
React popularity
Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated
How React is used
- React is a dependency in 2,038 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (41.9% of the 4,867 JavaScript/TypeScript ones), #1 of 76 in web frameworks.
- Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 9,721; those are left out of every share on this page.
- The most used alternative in our scan is Vue (169 projects).
- Projects that use it most often also use Tailwind CSS (79.6%), Lucide React (60.8%), Next.js (54.1%).
- It is more common in projects set up for Devin Desktop (43.0%) than for OpenCode (27.7%).
By coding agent
Often used with
React in practice
Strengths
You don't need to rewrite a site to start. The site says you can add React to an existing HTML page and render interactive components anywhere on it.
There is no template language to learn for conditions and loops. You use <code>if</code> statements and <code>array.map()</code> inside component functions.
React Native and Expo render React components as real Android and iOS views, not a web view. The site says this lets a team build web and native apps with the same skills.
The maintainers write that every commit is tested on "business-critical surfaces with over a billion users", and that over 100,000 React components at Meta help validate every migration strategy. They also say only proven approaches become part of React.
Watch out for
React does not handle routing or data fetching. The site recommends Next.js or React Router to build an entire app.
You add classes with <code>className</code>, but React does not say how CSS files get into the project. The docs point you to your build tool or framework's documentation.
Functions whose names start with <code>use</code> are Hooks. The Quick Start says they are more restrictive than other functions: you can only call them at the top of your components or other Hooks.
Render a component into the page
import { createRoot } from 'react-dom/client';
function HelloMessage({ name }) {
return <div>Hello {name}</div>;
}
const root = createRoot(document.getElementById('container'));
root.render(<HelloMessage name="Taylor" />);More about React
Agent Skills for it
- react-modernization: Upgrade React applications to latest versions, migrate from class components to hooks, and adopt concurrent features. Use when modernizing R
- react-native-dev: React Native and Expo development guide covering components, styling, animations, navigation, state management, forms, networking, performan
- react-expert: Use when building React 18+ applications in .jsx or .tsx files, Next.js App Router projects, or create-react-app setups. Creates components,
- react-vite-dashboard: Convert Stitch designs into production React + Vite dashboards with TanStack Query, accessible tokens from DESIGN.md, and Web3-ready pattern
- react-composition-patterns: React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component librarie
- react-hook-form: React Hook Form performance optimization for client-side form validation using useForm, useWatch, useController, useFieldArray, the subscrib
Head to head
- React vs Vue used together in 8 projects
- React vs Angular used together in 4 projects
- React vs Svelte used together in 4 projects
Packages around it
- react-dom: Browser renderer for React
- tailwindcss: Utility-first CSS
- eslint: JavaScript linter
- next: Full-stack React framework
- lucide-react: Icon components
- clsx: className string builder
Alternatives
React This page
Pick Vue when you prefer HTML-like templates over writing the screen in JavaScript; it is another framework for interactive pages.
Pick Preact when page weight matters most; our catalog lists it as a 4 kB alternative with the same modern style.
Pick Astro for content sites that are mostly static, adding interactive parts only where needed.
Full-featured web framework with TypeScript, dependency injection and RxJS.
Compiler-based frontend framework for building reactive web interfaces with less boilerplate.
Full-stack Vue.js framework for building type-safe production applications.
Get started
Tell your AI assistant
“Use react and react-dom 19.3.1 (same exact version for both), render with createRoot from react-dom/client, write components as functions with hooks, and do not use ReactDOM.render, propTypes or Create React App.”
For a new app, start from a framework that the React docs list, such as Next.js or React Router, with a pinned version.
To add React to an existing project, install both packages.
npm install react react-domThen render your first component into a box on the page with createRoot.
import { createRoot } from 'react-dom/client'; const domNode = document.getElementById('root'); const root = createRoot(domNode);
Rules for your agent
## React
- Start component names with a capital letter. HTML tags stay lowercase.
- Close every JSX tag (`<br />`). Wrap multiple returned tags in one parent or an empty `<>...</>` wrapper.
- Give each list item a `key` that is a string or number from the data, such as a database ID, unique among its siblings.
- Pass event handlers without calling them: `onClick={handleClick}`, with no parentheses at the end.
- Call Hooks such as `useState` only at the top of components or other Hooks.
- With React Compiler, rely on the compiler for memoization in new code. In existing code, leave `useMemo`/`useCallback` in place or test carefully before removing them.
- React does not do routing or data fetching. For a full app, use a framework such as Next.js or React Router.
Mistakes to avoid
ReactDOM.render was removed in React 19.
React 19 no longer publishes UMD (script-tag) builds.
Create React App is deprecated.
React 19 silently ignores propTypes.
Those versions have a critical remote code execution hole (CVE-2025-55182).
Questions
Can I just add a script tag, without a build step?
React 19 no longer ships the old script-tag files. The docs suggest loading it as a module from an ESM-based CDN; for real projects they use a build tool.
Do I need a server to use a React framework?
No. The frameworks the docs list can also make a static site or a single-page app that you host as plain files.
Can I use React on only part of a page?
Yes. You can render React components into one or several boxes on an existing page.
What is the current version?
The docs show 19.3 as the latest version; 19.3.1 is the current release on the package registry.