react /react
The library for web and native user interfaces.
★ 252,473⑂ 52,126👁 6,621⑃ 20,660● 14,828▤ 137◈ 0
252,473
stars
+38
52,126
forks
6,621
watchers
20,660
prs
14,828
issues
137
releases
0
discussions
README
React ·
React is a JavaScript library for building user interfaces.
Declarative: React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes. Declarative views make your code more predictable, simpler to understand, and easier to debug.
Component-Based: Build encapsulated components that manage their own state, then compose them to make complex UIs. Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep the state out of the DOM.
Learn Once, Write Anywhere: We don't make assumptions about the rest of your technology stack, so you can develop new features in React without rewriting existing code. React can also render on the server using Node and power mobile apps using React Native.
Learn how to use React in your project.
Installation
React has been designed for gradual adoption from the start, and you can use as little or as much React as you need:
Use Quick Start to get a taste of React.
Add React to an Existing Project to use as little or as much React as you need.
Create a New React App if you're looking for a powerful JavaScript toolchain.
Documentation
You can find the React documentation on the website.
Check out the Getting Started page for a quick overview.
The documentation is divided into several sections:
Quick Start
Tutorial
Thinking in React
Installation
Describing the UI
Adding Interactivity
Managing State
Advanced Guides
API Reference
Where to Get Support
Contributing Guide
You can improve it by sending pull requests to this repository.
Examples
We have several examples on the website. Here is the first one to get you started:
jsx
import { createRoot } from 'react-dom/client';
function HelloMessage({ name }) {
return Hello {name};
}
const root = createRoot(document.getElementById('container'));
root.render();
This example will render "Hello Taylor" into a container on the page.
You'll notice that we used an HTML-like syntax; we call it JSX. JSX is not required to use React, but it makes code more readable, and writing it feels like writing HTML.
Contributing
The main purpose of this repository is to continue evolving React core, making it faster and easier to use. Development of React happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving React.
Code of Conduct
Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.
Contributing Guide
Read our contributing guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to React.
Good First Issues
To help you gTop issues
#13991Hooks + multiple instances of React515 comments · 2018-10-27#11347RFC: Plan for custom element attributes/properties in React 19286 comments · 2017-10-24#17355"Should not already be working" in Firefox after a breakpoint/alert154 comments · 2019-11-13#1739Support asynchronous server rendering (waiting for data before rendering)146 comments · 2014-06-24#11503Formalize top-level ES exports134 comments · 2017-11-09#11387createPortal: support option to stop propagation of events in React tree129 comments · 2017-10-27#13206[Umbrella] Releasing Suspense119 comments · 2018-07-13#29034[React 19] allow opting out of automatic form reset when Form Actions are used105 comments · 2024-05-09
Latest release
19.3.1 (October 14th, 2026) v19.3.1 2026-10-14React Server Components - Improve transport protocol (37845 by @unstubbable and @eps1lon)
相关报道 (5)
News & coverage (15)
Hacker NewsReactopt – CLI React optimization tool that helps identify over-rendering▲ 7 · 0 comments · 2017-11-30Hacker NewsReact Visual Testing Developer Tool▲ 6 · 0 comments · 2017-08-23Hacker NewsAsk HN: REST API to Render Isomorphic JS(React)?▲ 4 · 2 comments · 2015-06-10Hacker NewsShow HN: DNA Platform – A School for Outliers▲ 2 · 7 comments · 2026-02-03Hacker NewsAsk HN: Open-Source Query Builder▲ 2 · 2 comments · 2024-02-20Hacker NewsA react web video player component▲ 2 · 0 comments · 2016-11-14Hacker NewsAsk HN: Is redux-little-router the best router option to use with redux?▲ 2 · 1 comments · 2016-10-03Hacker NewsShow HN: Looking for feedback on a Webpack/etc plugin▲ 2 · 1 comments · 2016-03-21Analytics Insight7 AI App Builders That Export Code to GitHub in 20262026-10-17githubGitHub for Beginners: Building a React App with GitHub Copilot2025-05-12