diff --git a/Libraries/ReactNative/AppRegistry.js b/Libraries/ReactNative/AppRegistry.js index ca553cbd0c3..81bef371de4 100644 --- a/Libraries/ReactNative/AppRegistry.js +++ b/Libraries/ReactNative/AppRegistry.js @@ -125,6 +125,7 @@ const AppRegistry = { appParameters.fabric, showArchitectureIndicator, scopedPerformanceLogger, + appKey === 'LogBox', ); }, }; @@ -292,4 +293,8 @@ const AppRegistry = { BatchedBridge.registerCallableModule('AppRegistry', AppRegistry); +if (__DEV__) { + AppRegistry.registerComponent('LogBox', () => () => null); +} + module.exports = AppRegistry; diff --git a/Libraries/ReactNative/renderApplication.js b/Libraries/ReactNative/renderApplication.js index d2aff2d7c32..c5bd0e024cd 100644 --- a/Libraries/ReactNative/renderApplication.js +++ b/Libraries/ReactNative/renderApplication.js @@ -29,6 +29,7 @@ function renderApplication( fabric?: boolean, showArchitectureIndicator?: boolean, scopedPerformanceLogger?: IPerformanceLogger, + isLogBox?: boolean, ) { invariant(rootTag, 'Expect to have a valid rootTag, instead got ', rootTag); @@ -39,7 +40,8 @@ function renderApplication( rootTag={rootTag} fabric={fabric} showArchitectureIndicator={showArchitectureIndicator} - WrapperComponent={WrapperComponent}> + WrapperComponent={WrapperComponent} + internal_excludeLogBox={isLogBox}>