Register LogBox by default in dev

Summary:
This diff stubs out registering LogBox as a renderable component. In later diffs, we'll render this component on the native side.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D18750005

fbshipit-source-id: 4db082ca2104731641d2d10de1ba83a318ab44fb
This commit is contained in:
Rick Hanlon
2019-12-10 19:52:23 +00:00
parent 64b4b33363
commit 041c392ec9
2 changed files with 8 additions and 1 deletions
+5
View File
@@ -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;
+3 -1
View File
@@ -29,6 +29,7 @@ function renderApplication<Props: Object>(
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<Props: Object>(
rootTag={rootTag}
fabric={fabric}
showArchitectureIndicator={showArchitectureIndicator}
WrapperComponent={WrapperComponent}>
WrapperComponent={WrapperComponent}
internal_excludeLogBox={isLogBox}>
<RootComponent {...initialProps} rootTag={rootTag} />
</AppContainer>
</PerformanceLoggerContext.Provider>