From b81a081bace78d5bf837d01be5706fffeec50ab8 Mon Sep 17 00:00:00 2001 From: Kevin Gozali Date: Tue, 2 Jan 2024 13:53:05 -0800 Subject: [PATCH] Log that bridgeless is enabled (if so) to the console (#42113) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/42113 For easier testing/debugging, log something if bridgeless is enabled for the app. This log will show up only once. Changelog: [Internal] Reviewed By: cortinico Differential Revision: D52464640 fbshipit-source-id: 5019a1a6bf4f171a5f1dc4b3b2692db9e07ff43c --- packages/react-native/Libraries/ReactNative/AppRegistry.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/react-native/Libraries/ReactNative/AppRegistry.js b/packages/react-native/Libraries/ReactNative/AppRegistry.js index afd4f08cff0..69afb10dc3a 100644 --- a/packages/react-native/Libraries/ReactNative/AppRegistry.js +++ b/packages/react-native/Libraries/ReactNative/AppRegistry.js @@ -361,7 +361,9 @@ global.RN$SurfaceRegistry = { setSurfaceProps: AppRegistry.setSurfaceProps, }; -if (global.RN$Bridgeless !== true) { +if (global.RN$Bridgeless === true) { + console.log('Bridgeless mode is enabled'); +} else { BatchedBridge.registerCallableModule('AppRegistry', AppRegistry); }