Full list of changes: * Text layout fixes for stack traces with badges ([eps1lon](https://github.com/eps1lon) in [#34925](https://github.com/facebook/react/pull/34925)) * chore: read from build/COMMIT_SHA fle as fallback for commit hash ([hoxyq](https://github.com/hoxyq) in [#34915](https://github.com/facebook/react/pull/34915)) * fix: dont ship source maps for css in prod builds ([hoxyq](https://github.com/hoxyq) in [#34913](https://github.com/facebook/react/pull/34913)) * Lower case "rsc stream" debug info ([sebmarkbage](https://github.com/sebmarkbage) in [#34921](https://github.com/facebook/react/pull/34921)) * BuiltInCallSite should have padding-left ([sebmarkbage](https://github.com/sebmarkbage) in [#34922](https://github.com/facebook/react/pull/34922)) * Show the Suspense boundary name in the rect if there's no overlap ([sebmarkbage](https://github.com/sebmarkbage) in [#34918](https://github.com/facebook/react/pull/34918)) * Don't attach filtered IO to grandparent Suspense ([eps1lon](https://github.com/eps1lon) in [#34916](https://github.com/facebook/react/pull/34916)) * Infer name from stack if it's the generic "lazy" name ([sebmarkbage](https://github.com/sebmarkbage) in [#34907](https://github.com/facebook/react/pull/34907)) * Use same Suspense naming heuristics when reconnecting ([eps1lon](https://github.com/eps1lon) in [#34898](https://github.com/facebook/react/pull/34898)) * Assign a different color and label based on environment ([sebmarkbage](https://github.com/sebmarkbage) in [#34893](https://github.com/facebook/react/pull/34893)) * Compute environment names for the timeline ([sebmarkbage](https://github.com/sebmarkbage) in [#34892](https://github.com/facebook/react/pull/34892)) * Don't highlight the root rect if no roots has unique suspenders ([sebmarkbage](https://github.com/sebmarkbage) in [#34885](https://github.com/facebook/react/pull/34885)) * Highlight the rect when the corresponding timeline bean is hovered ([sebmarkbage](https://github.com/sebmarkbage) in [#34881](https://github.com/facebook/react/pull/34881)) * Repeat the "name" if there's no short description in groups ([sebmarkbage](https://github.com/sebmarkbage) in [#34894](https://github.com/facebook/react/pull/34894)) * Tweak the rects design and create multi-environment color scheme ([sebmarkbage](https://github.com/sebmarkbage) in [#34880](https://github.com/facebook/react/pull/34880)) * Adjust the rects size by one pixel smaller ([sebmarkbage](https://github.com/sebmarkbage) in [#34876](https://github.com/facebook/react/pull/34876)) * Remove steps title from scrubber ([sebmarkbage](https://github.com/sebmarkbage) in [#34878](https://github.com/facebook/react/pull/34878)) * Include some sub-pixel precision in rects ([sebmarkbage](https://github.com/sebmarkbage) in [#34873](https://github.com/facebook/react/pull/34873)) * Don't pluralize if already plural ([sebmarkbage](https://github.com/sebmarkbage) in [#34870](https://github.com/facebook/react/pull/34870)) * Don't try to load anonymous or empty urls ([sebmarkbage](https://github.com/sebmarkbage) in [#34869](https://github.com/facebook/react/pull/34869)) * Add inspection button to Suspense tab ([sebmarkbage](https://github.com/sebmarkbage) in [#34867](https://github.com/facebook/react/pull/34867)) * Don't select on hover ([sebmarkbage](https://github.com/sebmarkbage) in [#34860](https://github.com/facebook/react/pull/34860)) * Don't highlight on timeline ([sebmarkbage](https://github.com/sebmarkbage) in [#34861](https://github.com/facebook/react/pull/34861)) * The bridge event types should only be defined in one direction ([sebmarkbage](https://github.com/sebmarkbage) in [#34859](https://github.com/facebook/react/pull/34859)) * Attempt at a better "unique suspender" text ([sebmarkbage](https://github.com/sebmarkbage) in [#34854](https://github.com/facebook/react/pull/34854)) * Track whether a boundary is currently suspended and make transparent ([sebmarkbage](https://github.com/sebmarkbage) in [#34853](https://github.com/facebook/react/pull/34853)) * Don't hide overflow rectangles ([sebmarkbage](https://github.com/sebmarkbage) in [#34852](https://github.com/facebook/react/pull/34852)) * Measure text nodes ([sebmarkbage](https://github.com/sebmarkbage) in [#34851](https://github.com/facebook/react/pull/34851)) * Don't measure fallbacks when suspended ([sebmarkbage](https://github.com/sebmarkbage) in [#34850](https://github.com/facebook/react/pull/34850)) * Filter out built-in stack frames ([sebmarkbage](https://github.com/sebmarkbage) in [#34828](https://github.com/facebook/react/pull/34828)) * Exclude Suspense boundaries in hidden Activity ([eps1lon](https://github.com/eps1lon) in [#34756](https://github.com/facebook/react/pull/34756)) * Group consecutive suspended by rows by the same name ([sebmarkbage](https://github.com/sebmarkbage) in [#34830](https://github.com/facebook/react/pull/34830)) * Preserve the original index when sorting suspended by ([sebmarkbage](https://github.com/sebmarkbage) in [#34829](https://github.com/facebook/react/pull/34829)) * Don't show the root as being non-compliant ([sebmarkbage](https://github.com/sebmarkbage) in [#34827](https://github.com/facebook/react/pull/34827)) * Ignore suspense boundaries, without visual representation, in the timeline ([sebmarkbage](https://github.com/sebmarkbage) in [#34824](https://github.com/facebook/react/pull/34824)) * Explicitly say which id to scroll to and only once ([sebmarkbage](https://github.com/sebmarkbage) in [#34823](https://github.com/facebook/react/pull/34823)) * devtools: fix ellipsis truncation for key values ([sophiebits](https://github.com/sophiebits) in [#34796](https://github.com/facebook/react/pull/34796)) * fix(devtools): remove duplicated "Display density" field in General settings ([Anatole-Godard](https://github.com/Anatole-Godard) in [#34792](https://github.com/facebook/react/pull/34792)) * Gate SuspenseTab ([hoxyq](https://github.com/hoxyq) in [#34754](https://github.com/facebook/react/pull/34754)) * Release `<ViewTransition />` to Canary ([eps1lon](https://github.com/eps1lon) in [#34712](https://github.com/facebook/react/pull/34712)) |
||
|---|---|---|
| .codesandbox | ||
| .github | ||
| compiler | ||
| fixtures | ||
| flow-typed | ||
| packages | ||
| scripts | ||
| .editorconfig | ||
| .eslintignore | ||
| .eslintrc.js | ||
| .git-blame-ignore-revs | ||
| .gitattributes | ||
| .gitignore | ||
| .mailmap | ||
| .nvmrc | ||
| .prettierignore | ||
| .prettierrc.js | ||
| .watchmanconfig | ||
| babel.config-react-compiler.js | ||
| babel.config-ts.js | ||
| babel.config.js | ||
| CHANGELOG.md | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| dangerfile.js | ||
| flow-typed.config.json | ||
| LICENSE | ||
| MAINTAINERS | ||
| package.json | ||
| react.code-workspace | ||
| ReactVersions.js | ||
| README.md | ||
| SECURITY.md | ||
| yarn.lock | ||
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:
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" />);
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 get your feet wet and get you familiar with our contribution process, we have a list of good first issues that contain bugs that have a relatively limited scope. This is a great place to get started.
License
React is MIT licensed.