From 1bb7446993e5151b92367f33f5bed3f5783f471a Mon Sep 17 00:00:00 2001 From: Tim Yung Date: Thu, 13 Mar 2025 04:09:43 -0700 Subject: [PATCH] RN: Set `react.runtime=automatic` in Flow Config (#50001) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50001 Updates `react-native/.flowconfig` with the following option: ``` react.runtime=automatic ``` This adjusts Flow to model the current behavior of React and JSX, relaxing the requirement that JSX elements have `React` within scope. Changelog: [General][Changed] - Changed Flow for the React Native monorepo, so that `React` no longer has to be in scope when using JSX. Reviewed By: javache Differential Revision: D71096283 fbshipit-source-id: 65762ac39206c682b7be5d3f512b2b83f7eb1b49 --- .flowconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.flowconfig b/.flowconfig index ee7c3101d56..3ff4d04771c 100644 --- a/.flowconfig +++ b/.flowconfig @@ -67,6 +67,8 @@ module.name_mapper='^react-native/\(.*\)$' -> '/packages/react-nat module.name_mapper='^@react-native/dev-middleware$' -> '/packages/dev-middleware' module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\|xml\)$' -> '/packages/react-native/Libraries/Image/RelativeImageStub' +react.runtime=automatic + suppress_type=$FlowIssue suppress_type=$FlowFixMe suppress_type=$FlowFixMeProps