The library for web and native user interfaces. https://react.dev
Find a file
Zeya Peng 6a04c369f1
Enables Basic View Transition support for React Native Fabric renderer (#35764)
## Summary

Enables Basic View Transition support for React Native Fabric renderer.

**Implemented:**
- Added FabricUIManager bindings for view transition methods:
`applyViewTransitionName`, `startViewTransition`
- Implemented `startViewTransition` with proper callback orchestration
(mutation → layout → afterMutation → spawnedWork → passive)
- Added fallback behavior that flushes work synchronously when Fabric's
`startViewTransition` returns null (e.g., when the ViewTransition
ReactNativeFeatureFlag is not enabled)
- Added Flow type declarations for new FabricUIManager methods
- Stubbed with `__DEV__` warnings for all the other view transition
config functions that are not yet implemented

This allows React Native apps using Fabric to leverage the View
Transition API for coordinated animations during state transitions, with
graceful degradation when the native side doesn't support it.

Below are diagrams of proposed architecture in fabric, and observation
of what/when config functions get called during a basic shared
transition example

<img width="2290" height="1529" alt="Untitled-2026-03-19-1240"
src="https://github.com/user-attachments/assets/192c9169-bc25-449c-a33b-dfec67179e7f"
/>

## How did you test this change?

- [x] `yarn flow fabric` - Flow type checks pass
- [x] `yarn lint` - Lint checks pass
- [x] Manually tested in Android catalyst app with
`enableViewTransition` and `enableViewTransitionForPersistenceMode `in
`ReactFeatureFlags.test-renderer.native-fb.js` and View Transition
enabled via ReactNativeFeatureFlag
- [x] Verified in the minified `ReactFabric-dev.fb.js` that the 'shim'
config functions are not included
- [x] Verified fallback behavior logs warning in `__DEV__` and flushes
work synchronously when ViewTransition flag isn't enabled in Fabric
2026-03-19 17:58:29 -04:00
.claude [repo] init claude config (#35617) 2026-01-23 20:16:06 -05:00
.codesandbox Update Code Sandbox CI to Node 20 to Match .nvmrc (#34329) 2025-08-28 18:33:12 -04:00
.github [eslint-plugin-react-hooks] Add ESLint v10 support (#35720) 2026-02-13 10:26:01 -08:00
compiler Bump undici from 6.21.2 to 6.23.0 in /compiler (#35512) 2026-03-12 08:40:37 -07:00
fixtures Bump qs from 6.4.0 to 6.4.1 in /fixtures/packaging/webpack-alias/dev (#35505) 2026-03-12 08:40:22 -07:00
flow-typed [DevTools] Don't connect to pages that are being prerendered (#35958) 2026-03-04 13:39:16 +01:00
packages Enables Basic View Transition support for React Native Fabric renderer (#35764) 2026-03-19 17:58:29 -04:00
scripts Enables Basic View Transition support for React Native Fabric renderer (#35764) 2026-03-19 17:58:29 -04:00
.editorconfig Remove trim_trailing_whitespace from editorconfig (#31413) 2024-11-04 15:30:02 -05:00
.eslintignore Update Flow to 0.263 (#34269) 2025-08-22 12:10:13 -04:00
.eslintrc.js [noop] Fix createContainer argument order in the Fiber implementation (#35945) 2026-03-04 14:20:43 +01:00
.git-blame-ignore-revs Add run prettier commit to .git-blame-ignore-revs 2024-07-18 17:42:45 -04:00
.gitattributes .gitattributes to ensure LF line endings when we should 2014-01-17 16:25:53 -08:00
.gitignore worktree script improvements (#35603) 2026-01-23 10:41:17 -08:00
.mailmap updates mailmap entries (#19824) 2020-09-12 13:05:52 -04:00
.nvmrc Upgrade node.js to 20 LTS (#32855) 2025-04-14 12:52:02 -04:00
.prettierignore [prettier] Ignore compiler/target (#31168) 2024-10-10 10:53:27 -04:00
.prettierrc.js [scripts] Switch back to flow parser for prettier (#33414) 2025-06-03 00:00:28 -04:00
.watchmanconfig .watchmanconfig must be valid json (#16118) 2019-07-11 19:01:02 -07:00
babel.config-react-compiler.js feat(eslint-plugin-react-hooks): merge rule from eslint-plugin-react-compiler into react-hooks plugin (#32416) 2025-03-12 21:43:06 -04:00
babel.config-ts.js [compiler] Aggregate error reporting, separate eslint rules (#34176) 2025-08-21 14:53:34 -07:00
babel.config.js Partially revert #32588 (#32621) 2025-03-15 15:21:57 -04:00
CHANGELOG.md Update changelog with latest releases (#35279) 2025-12-03 18:13:43 +01:00
CLAUDE.md [repo] init claude config (#35617) 2026-01-23 20:16:06 -05:00
CODE_OF_CONDUCT.md revert last grammatical edit (#25067) 2022-08-10 20:14:31 +01:00
CONTRIBUTING.md Fix: Updated link in CONTRIBUTING (#25381) 2022-10-03 10:29:57 -04:00
dangerfile.js Fix typo in dangerfile.js which results in an unreachable code path… (#32277) 2025-01-31 01:44:02 -05:00
flow-typed.config.json Update Flow to 0.263 (#34269) 2025-08-22 12:10:13 -04:00
LICENSE [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
MAINTAINERS Update MAINTAINERS (#34534) 2025-09-19 15:49:08 -04:00
package.json [tests] add silent reporter (#35547) 2026-01-18 10:17:17 -05:00
react.code-workspace created a vscode workspace file for the repo (#29830) 2024-06-13 16:23:42 +01:00
ReactVersions.js [eprh] Bump ReactVersions for next version (#34965) 2025-10-23 13:43:27 -04:00
README.md [ez] Remove circleci badge from readme 2024-07-29 13:26:14 -04:00
SECURITY.md Create SECURITY.md (#15784) 2020-01-09 14:07:41 -08:00
yarn.lock Bump jws from 3.2.2 to 3.2.3 (#35373) 2026-03-12 08:38:01 -07:00

React · GitHub license npm version (Runtime) Build and Test (Compiler) TypeScript PRs Welcome

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:

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:

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.