react-native
AGENTS.md127k starsChanged 5 months agoMITView on GitHub
A framework for building native applications using React. React Native is a monorepo: the react-native package, the packages published alongside it, and the apps and tooling used to develop them. Architecture notes live in docs directories beside the code they describe, indexed by docs/README.md. Treat them as reference for the subsystem you are working in, not as required reading. JavaScript CI is the lint, testjs, and buildjs_types jobs in .github/workflows/test-all.yml; Fantom and the native platforms have their own jobs. The…
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 59
Never hand-edit generated output — change the source and regenerate.
- Distinctive: line 69
Keep each change focused — no unrelated refactors, formatting, or dependency updates.
≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
React Native
A framework for building native applications using React.
Repo structure
React Native is a monorepo: the react-native package, the packages published alongside it, and the apps and tooling used to develop them.
| Path | Contents |
packages/react-native/Libraries | JavaScript source (Flow) — the legacy location, with code gradually moving to src/private |
packages/react-native/src/private | JavaScript source (Flow) |
packages/react-native/ReactCommon | Shared C++ — Fabric renderer, TurboModules, JSI, Yoga, jsinspector-modern |
packages/react-native/ReactAndroid | Android runtime (Kotlin, Java, JNI) |
packages/react-native/{React,ReactApple} | Apple runtime (Objective-C++, Swift) |
packages/rn-tester | RNTester — test app showcasing each core component and API, plus a Playground scratch surface |
packages/* | Other published packages — Metro config, Codegen, ESLint config, dev-middleware, React Native DevTools frontend |
private/* | Unpublished — the helloworld sample app, the react-native-fantom test runner |
scripts/* | Repository tooling — build, test, release, and CI scripts |
Architecture notes live in __docs__ directories beside the code they describe, indexed by __docs__/README.md. Treat them as reference for the subsystem you are working in, not as required reading.
Environment
- Yarn v1, pinned via
packageManager. Run commands from the repository root. - JavaScript work — lint, type checks, Jest, Metro — needs only Node and Yarn, on any platform.
- Native builds need a platform toolchain: Xcode with CocoaPods or Swift Package Manager for iOS (macOS only), and the Android SDK and NDK with Gradle for Android. See Building from source.
Common commands
| Command | Purpose |
yarn test <path> | Jest unit tests, found in __tests__ directories |
yarn fantom <path> | Fantom integration tests, named *-itest.js — builds a native tester on first run |
yarn lint | ESLint (--max-warnings 0) |
yarn flow-check | Flow |
yarn format | Format JavaScript/TypeScript, C/C++/Objective-C/protobuf, Kotlin, Java, Python, and Swift sources |
yarn format-check | Check all repository formatting without changing files |
yarn format-<language> | Format one language: javascript, cpp, kotlin, java, python, or swift |
yarn format-check-<language> | Check one language without changing files |
JavaScript CI is the lint, test_js, and build_js_types jobs in .github/workflows/test-all.yml; Fantom and the native platforms have their own jobs.
The formatting command uses pinned npm packages for Kotlin and Java and installs pinned Ruff through Python. To format every language, install a JDK with Java 17 or newer, Python 3 with pip, and a Swift 6.3 or newer toolchain in addition to Node and Yarn. Each language wrapper checks its own requirements and prints installation guidance when something is missing; yarn format then skips that language and continues formatting the others. Swift formatting accepts either swift-format or swift format from the installed toolchain.
Verification: Running RNTester
Needed only for changes that have to be seen running, such as user interface behavior.
yarn start serves RNTester over Metro at http://localhost:8081; yarn android builds and installs it on Android. Check the bundler with curl "http://localhost:8081/js/RNTesterApp.bundle?platform=ios&dev=true".
Gotchas
yarn installdirties the working tree: apreinstallhook (scripts/try-set-hermes-compiler-prebuilt.js) resolves thehermes-compilerplaceholder inpackages/react-native/package.json(0.0.0→ a real version) and touchesyarn.lock. Expected — do not commit it.- Metro cannot bundle until codegen is built once —
yarn --cwd packages/react-native-codegen build. Without it, bundling fails withCannot find module '@react-native/codegen/lib/parsers/flow/parser'. Every other package runs from source —yarn buildis not needed for development (seescripts/build/README.md).
Generated code
Never hand-edit generated output — change the source and regenerate. CI validates the committed snapshots.
- Native modules and components are declared by JavaScript specs (
Native*.js,*NativeComponent.js); their native counterparts are generated at build time. - Feature flags are declared in
packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js;yarn featureflagsregenerates the JavaScript, Java, and C++ accessors. - JavaScript sources are typed with Flow, and the public API is exported from
packages/react-native/index.js. TypeScript types are generated from those sources, andpackages/react-native/ReactNativeApi.d.tsis a committed snapshot of that API — runyarn build-typesto regenerate both whenever the public API changes, thenyarn test-generated-typescriptto type-check the result. - The public native API is snapshotted as well: C++ under
scripts/cxx-api(yarn cxx-api-build), and Android inpackages/react-native/ReactAndroid/api/ReactAndroid.api. CHANGELOG.mdis compiled at release time from pull request descriptions.
Contributing guidelines
- Keep each change focused — no unrelated refactors, formatting, or dependency updates.
- Complete the pull request template — the motivation and the user-visible effect, and a changelog entry with its category and type tags.
- In the test plan, give the exact commands you ran and their results, plus screenshots or a video for user-interface changes. Say which checks you could not run.
The full process is on reactnative.dev.
Trending
More talk lately.thin dataabout the whole repository
Who's talking about react/react-native
- 크로스플랫폼 코리아“접히는 아이폰이 왔는데 앱은 그대로 둬도 될까?”YouTube · Sep 17, 2026 · 474 views
- @rwruedii.bsky.social“Here is the fucking source code, read it: github.com/react/react-...”Bluesky · Sep 11, 2026
- en.wikipedia.org“React Native”the web · Oct 13, 2026
- expo.dev“What is React Native — Articles”the web · Oct 8, 2026
- medium.com“How to Boost Your App Ratings with React Native In- ...”the web · Mar 20, 2026
The biggest 5 of 9 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 9
Talked about on the web, YouTube and Bluesky (9 times).
On the web · 7
- Oct 13, 2026React Native — en.wikipedia.org
- Oct 8, 2026What is React Native — Articles — expo.dev
- Mar 20, 2026How to Boost Your App Ratings with React Native In- ... — medium.com
- Oct 20, 2024React Native vs Dual Native: I Learned Both So You Don't ... — medium.com
- May 15, 2022Review of React Native Expo – Welcome to my Tech Talk — blogs.oregonstate.edu
2 more on the web
- Dec 31, 2019A Year of React - 2019 in Review — dev.to
- Sep 9, 20184 reasons why you should use React Native for your next MVP — madhavanmalolan.medium.com
On YouTube · 1
- Sep 17, 2026접히는 아이폰이 왔는데 앱은 그대로 둬도 될까? — 크로스플랫폼 코리아474 views
On Bluesky · 1
- Sep 11, 2026Here is the fucking source code, read it: github.com/react/react-... — @rwruedii.bsky.social0 likes and reposts · 2 replies
Other versions1 project uses a version of this.
Word for word · 1
- react-native-tvos/react-native-tvos★ 1.4k100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 28,693 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

