# Contributor handoff — react/react-native

> Canonical page: https://codevetter.com/unpack/react-native/agent-handoff

# Contributor handoff — react/react-native

Scanned commit b7c0e4986a0242cdd47afd002f3e712e80914c3c (2026-09-22). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

Start with AGENTS.md — it is the canonical contributor doc (repo layout, commands, gotchas). JS is Flow; expect paired .js/.js.flow files and code split between Libraries/ (legacy) and src/private/ (target). Verify with yarn test / yarn fantom / yarn lint / yarn flow-check; build @react-native/codegen once before Metro works. Never hand-edit generated artifacts — regenerate via yarn featureflags / yarn build-types / codegen and keep index.js in sync with index.js.flow. Respect the committed API snapshots (ReactNativeApi.d.ts, ReactAndroid.api, scripts/cxx-api) and the yarn.lock churn from the preinstall hook.
- AGENTS.md is the authoritative onboarding doc: it maps every top-level dir, lists yarn commands, documents the codegen-build prerequisite and the preinstall yarn.lock dirtying — read it before editing. — [AGENTS.md](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/AGENTS.md)
- JS edits go in packages/react-native/src/private for new code (Libraries/ is the legacy location being migrated); all JS is Flow-typed (@flow strict/strict-local pragmas) and many public modules have a .js.flow twin that must be kept in sync (e.g. index.js vs index.js.flow). — [AGENTS.md](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/AGENTS.md) [packages/react-native/index.js#L19-25](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/index.js#L19-L25) [packages/react-native/index.js.flow](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/index.js.flow) [packages/react-native/src/private](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/src/private)
- Verification ladder for a JS change: yarn test <path> (Jest, -test.js files in __tests__), yarn fantom <path> (integration, -itest.js — first run builds the native tester), yarn lint (zero warnings allowed), yarn flow-check, yarn format-check-javascript. — [package.json#L34-47](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/package.json#L34-L47) [jest.config.js#L44-52](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/jest.config.js#L44-L52) [private/react-native-fantom/__docs__/README.md#L102-113](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/private/react-native-fantom/__docs__/README.md#L102-L113) [AGENTS.md](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/AGENTS.md)
- Bootstrap trap: Metro cannot bundle until codegen is built once — run `yarn --cwd packages/react-native-codegen build`; every other package runs from source so `yarn build` is otherwise unnecessary for development. — [AGENTS.md](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/AGENTS.md) [scripts/build/build.js#L52-65](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/scripts/build/build.js#L52-L65)
- Generated code rule: never hand-edit generated output — native specs produce bindings at build time; feature flags regenerate via `yarn featureflags`; TS types via `yarn build-types` + snapshot ReactNativeApi.d.ts; C++ API via `yarn cxx-api-build`; Android API surface is committed at ReactAndroid/api/ReactAndroid.api. CI validates all of them. — [AGENTS.md](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/AGENTS.md) [packages/react-native/ReactNativeApi.d.ts](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/ReactNativeApi.d.ts) [packages/react-native/ReactAndroid/api/ReactAndroid.api](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/ReactAndroid/api/ReactAndroid.api) [scripts/cxx-api/api-snapshots](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/scripts/cxx-api/api-snapshots) [package.json#L11-14](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/package.json#L11-L14)
- Test placement conventions: Jest tests live in __tests__/ dirs as *-test.js; Fantom integration tests use *-itest.js and must live inside packages/react-native (Fantom is scoped to RN internals); benchmarks use *-benchmark-itest.js; prefer public-API imports ('react-native') over internals in Fantom tests. — [jest.config.js#L44-52](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/jest.config.js#L44-L52) [private/react-native-fantom/__docs__/README.md#L64-100](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/private/react-native-fantom/__docs__/README.md#L64-L100) [private/react-native-fantom/__docs__/README.md#L181-220](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/private/react-native-fantom/__docs__/README.md#L181-L220)
- Safe edit boundaries: tooling packages (community-cli-plugin, dev-middleware, metro-config, codegen) are self-contained with their own __tests__; runtime JS changes should respect __DEV__ gating and warnOnce/invariant patterns; native changes require the matching platform toolchain (Xcode+CocoaPods for iOS, Android SDK+NDK+Gradle). — [AGENTS.md](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/AGENTS.md) [packages/dev-middleware/src/__tests__](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/dev-middleware/src/__tests__) [packages/react-native/index.js#L431-447](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/index.js#L431-L447) [packages/react-native/Libraries/ReactNative/AppContainer-dev.js](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/Libraries/ReactNative/AppContainer-dev.js)
- Known traps: `yarn install` dirties yarn.lock (preinstall hermes-compiler rewrite — do not commit); Jest moduleNameMapper aliases exist only for setup-env/react-private-interface/unstable-internals-do-not-use — new subpath exports need mapper entries or Jest resolution breaks. — [AGENTS.md](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/AGENTS.md) [jest.config.js#L28-38](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/jest.config.js#L28-L38) [scripts/try-set-hermes-compiler-prebuilt.js](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/scripts/try-set-hermes-compiler-prebuilt.js)
- Runtime verification loop: `yarn start` serves RNTester via Metro on http://localhost:8081 (RCT_METRO_PORT overrides); `yarn android` builds+installs it; sanity-check the bundler with curl 'http://localhost:8081/js/RNTesterApp.bundle?platform=ios&dev=true'. — [AGENTS.md](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/AGENTS.md) [packages/metro-config/src/index.flow.js#L74-76](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/metro-config/src/index.flow.js#L74-L76) [packages/rn-tester/README.md](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/rn-tester/README.md)
- Architecture docs live in __docs__/ directories beside the code they describe (indexed by root __docs__/README.md) — e.g. feature flags, inspector proxy protocol, runtime scheduler event loop, intersection/mutation observers; treat them as reference for the subsystem being edited. — [__docs__/README.md#L1-13](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/__docs__/README.md#L1-L13) [__docs__/README.md#L40-99](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/__docs__/README.md#L40-L99) [packages/react-native/src/private/featureflags/__docs__/README.md](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/src/private/featureflags/__docs__/README.md) [packages/dev-middleware/src/inspector-proxy/__docs__/README.md](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/dev-middleware/src/inspector-proxy/__docs__/README.md)
- PR conventions: keep changes focused (no unrelated refactors/formatting), complete the changelog category/type tags in the PR template (CHANGELOG.md is compiled at release from PR descriptions), and state exact test commands run plus screenshots for UI changes. — [AGENTS.md](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/AGENTS.md) [CONTRIBUTING.md](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/CONTRIBUTING.md) [CHANGELOG.md](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/CHANGELOG.md)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
