Files
react-native/packages/react-native-codegen
Jakub Piasecki 095e563fb3 Emit umbrella header includes from codegen (#58730)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/58730

Codegen output is compiled in consumer targets, so it now includes React Native through module umbrella headers (`<React/RendererCore.h>`, `<React/Graphics.h>`, `<React/NativeModuleCore.h>`, etc.) instead of fine-grained paths, which hard-error under `RN_STRICT_API`.

The one exception is `<react/renderer/debug/debugStringConvertibleUtils.h>`, which `Props.cpp` still includes directly alongside `<React/RendererDebug.h>`. It is a private header not re-exported by any umbrella, but it is only emitted together with the `getDebugProps` implementation, which is generated solely for React Native's own core components library (`FBReactNativeSpec`). That library is built as part of React Native (`RN_BUILDING`), so the private-header guard does not apply.

Changelog:
[General][Changed] - Codegen-generated C++ includes React Native through module umbrella headers

Reviewed By: cortinico

Differential Revision: D122317911

fbshipit-source-id: 53b3275acf148c665c27470a929cd0397bdce6d9
2026-10-02 02:15:49 -07:00
..

@react-native/codegen

npm npm downloads

Code generation tools for React Native. Parses TypeScript and Flow NativeModule and Component specs and generates the native binding code used by the New Architecture.