# Extension points — react/react-native

> Canonical page: https://codevetter.com/unpack/react-native/extension-points

# Extension points — react/react-native

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

Extension happens at well-defined seams: JS spec files (Native*.js / *NativeComponent.js) + codegenConfig libraries in package.json feed codegen; TurboModuleRegistry and codegenNativeComponent/requireNativeComponent are the runtime registration points; AppRegistry.registerComponent(+setWrapperComponentProvider/setRootViewStyleProvider) registers root surfaces; community-cli-plugin exports composable Command objects (with unstable_createBundleCommandParser for custom parsers); createDevMiddleware exposes unstable_* hooks; metro-config exposes getDefaultConfig/mergeConfig/setFrameworkDefaults; the Gradle ReactExtension DSL and iOS RCTReactNativeFactoryDelegate/RCTDependencyProvider are the native wiring points; the feature-flag config and Fantom pragmas are repo-internal extension points.
- New TurboModule: author a `Native<Name>.js` spec (typed interface extending TurboModule) and fetch it with TurboModuleRegistry.getEnforcing('<Name>'); the react-native package's own specs are declared in package.json codegenConfig.libraries (FBReactNativeSpec, jsSrcsDir 'src', per-module ios unstableRequiresMainQueueSetup flags). — [packages/react-native/package.json#L184-215](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/package.json#L184-L215) [packages/react-native/Libraries/TurboModule/TurboModuleRegistry.js#L35-47](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/Libraries/TurboModule/TurboModuleRegistry.js#L35-L47) [packages/react-native/Libraries/NativeModules/specs/NativeDevSettings.js](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/Libraries/NativeModules/specs/NativeDevSettings.js)
- New Fabric component: author a `*NativeComponent.js` spec consumed by codegenNativeComponent (options: interfaceOnly, paperComponentName, paperComponentNameDeprecated, excludedPlatforms); codegenNativeCommands generates the imperative command dispatchers; requireNativeComponent remains the runtime lookup. — [packages/react-native/Libraries/Utilities/codegenNativeComponent.js#L19-51](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/Libraries/Utilities/codegenNativeComponent.js#L19-L51) [packages/react-native/Libraries/Utilities/codegenNativeCommands.js](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/Libraries/Utilities/codegenNativeCommands.js) [packages/react-native/Libraries/ReactNative/requireNativeComponent.js](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/Libraries/ReactNative/requireNativeComponent.js) [packages/react-native/Libraries/Components/View/ViewNativeComponent.js](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/Libraries/Components/View/ViewNativeComponent.js)
- App registration seams: AppRegistry.registerComponent/registerConfig/registerRunnable; setWrapperComponentProvider wraps every root component; setRootViewStyleProvider injects root view styles; registerCallableModule exposes a JS module to native callers via BatchedBridge. — [packages/react-native/Libraries/ReactNative/AppRegistryImpl.js#L47-60](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/Libraries/ReactNative/AppRegistryImpl.js#L47-L60) [packages/react-native/Libraries/ReactNative/AppRegistryImpl.js#L65-120](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/Libraries/ReactNative/AppRegistryImpl.js#L65-L120) [packages/react-native/Libraries/Core/registerCallableModule.js](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/Libraries/Core/registerCallableModule.js)
- CLI extension: @react-native/community-cli-plugin exports Command objects (bundleCommand, startCommand, codegenCommand, spmCommand) that any CLI config can register; unstable_createBundleCommandParser(additionalOptions) builds a commander parser with the base bundle options plus caller-supplied ones; unstable_buildBundleWithConfig lets embedders invoke bundling programmatically. — [packages/community-cli-plugin/src/index.flow.js#L11-19](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/community-cli-plugin/src/index.flow.js#L11-L19) [packages/community-cli-plugin/src/commands/bundle/index.js#L157-171](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/community-cli-plugin/src/commands/bundle/index.js#L157-L171)
- Dev-middleware hooks: createDevMiddleware accepts unstable_eventReporter (structured event sink), unstable_experiments (enableOpenDebuggerRedirect, enableNetworkInspector, enableStandaloneFuseboxShell), unstable_toolLauncher (custom app launcher for the debugger frontend), unstable_customInspectorMessageHandler (per device/debugger-pair CDP handler), unstable_trackInspectorProxyEventLoopPerf. — [packages/dev-middleware/src/createDevMiddleware.js#L27-95](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/dev-middleware/src/createDevMiddleware.js#L27-L95) [packages/dev-middleware/src/createDevMiddleware.js#L148-154](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/dev-middleware/src/createDevMiddleware.js#L148-L154)
- Metro config extension: getDefaultConfig(projectRoot) merges Metro defaults + reactNativeDefaults + frameworkDefaults; frameworks inject config via setFrameworkDefaults(); mergeConfig is re-exported for user overrides; resolver sets resolverMainFields ['react-native','browser','main'], platforms ['android','ios'], unstable_conditionNames ['react-native']. — [packages/metro-config/src/index.flow.js#L44-105](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/metro-config/src/index.flow.js#L44-L105)
- Android app wiring: subclass DefaultReactNativeHost/ReactNativeHost and return extra ReactPackage instances from getPackages(); ReactActivityDelegate exposes getLaunchOptions/createRootView overrides; the react-native-gradle-plugin exposes a `react {}` DSL (ReactExtension) plus settings-plugin ReactSettingsPlugin for autolinking. — [packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactNativeHost.kt#L191-197](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactNativeHost.kt#L191-L197) [packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java#L64-85](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java#L64-L85) [packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactPackage.kt](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactPackage.kt) [packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt)
- iOS app wiring: RCTReactNativeFactory takes an RCTReactNativeFactoryDelegate (RCTDefaultReactNativeFactoryDelegate provided); RCTDependencyProvider supplies autolinked dependencies; third-party Fabric components register through RCTComponentViewFactory's thirdPartyFabricComponentsProvider which the factory sets to itself. — [packages/react-native/Libraries/AppDelegate/RCTReactNativeFactory.mm#L76-95](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/Libraries/AppDelegate/RCTReactNativeFactory.mm#L76-L95) [packages/react-native/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm) [packages/react-native/Libraries/AppDelegate/RCTDependencyProvider.h](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/Libraries/AppDelegate/RCTDependencyProvider.h)
- Feature-flag extension: add a definition (common|jsOnly scope, defaultValue, metadata{description,purpose,expectedReleaseValue,dateAdded}, ossReleaseStage, optional skipNativeAPI) in ReactNativeFeatureFlags.config.js and run `yarn featureflags` to regenerate JS/Java/C++ accessors; Fantom tests override flags via @fantom_flags pragmas. — [packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js#L15-58](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js#L15-L58) [packages/react-native/scripts/featureflags/index.js](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native/scripts/featureflags/index.js) [private/react-native-fantom/__docs__/README.md#L296-330](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/private/react-native-fantom/__docs__/README.md#L296-L330)
- Consumer-facing presets: @react-native/jest-preset packages the preprocessor/resolver/setup for app tests; eslint-config-react-native + eslint-plugin-react-native + eslint-plugin-specs package the lint surface; @react-native/typescript-config ships tsconfig bases; babel-preset + metro-babel-transformer are the transform seam. — [packages/jest-preset/package.json](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/jest-preset/package.json) [packages/jest-preset/jest/resolver.js](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/jest-preset/jest/resolver.js) [packages/eslint-plugin-react-native/package.json](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/eslint-plugin-react-native/package.json) [packages/eslint-plugin-specs/package.json](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/eslint-plugin-specs/package.json) [packages/typescript-config](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/typescript-config) [packages/react-native-babel-preset/package.json](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native-babel-preset/package.json) [packages/react-native-babel-transformer/package.json](https://github.com/react/react-native/blob/b7c0e4986a0242cdd47afd002f3e712e80914c3c/packages/react-native-babel-transformer/package.json)

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)
