Skip to content

Commit

Permalink
Log that bridgeless is enabled (if so) to the console (facebook#42113)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#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
  • Loading branch information
fkgozali authored and facebook-github-bot committed Jan 2, 2024
1 parent 41d9ed0 commit b81a081
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/react-native/Libraries/ReactNative/AppRegistry.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit b81a081

Please sign in to comment.