Switch to LogBox completely

Summary:
This diff replaces YellowBox with LogBox so that it can be deprecated and removed.

After this diff, it will no longer be possible to go back to YellowBox and all paths referencing it will be gone.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D19949695

fbshipit-source-id: 28a55866e514020bdcc6854aae565cffbbe8af58
This commit is contained in:
Rick Hanlon
2020-02-19 18:01:43 -08:00
committed by Facebook Github Bot
parent da9364fa3e
commit a83ea6ab8c
2 changed files with 8 additions and 8 deletions
+1 -2
View File
@@ -76,8 +76,7 @@ function reportException(
message =
e.jsEngine == null ? message : `${message}, js engine: ${e.jsEngine}`;
const isHandledByLogBox =
e.forceRedbox !== true && global.__unstable_isLogBoxEnabled === true;
const isHandledByLogBox = e.forceRedbox !== true;
const data = preprocessException({
message,
+7 -6
View File
@@ -91,14 +91,15 @@ class AppContainer extends React.Component<Props, State> {
}
render(): React.Node {
let yellowBox = null;
let logBox = null;
if (__DEV__) {
if (
!global.__RCTProfileIsProfiling &&
!this.props.internal_excludeLogBox
) {
const YellowBox = require('../YellowBox/YellowBox');
yellowBox = <YellowBox />;
const LogBoxNotificationContainer = require('../LogBox/LogBoxNotificationContainer')
.default;
logBox = <LogBoxNotificationContainer />;
}
}
@@ -132,7 +133,7 @@ class AppContainer extends React.Component<Props, State> {
<View style={styles.appContainer} pointerEvents="box-none">
{!this.state.hasError && innerView}
{this.state.inspector}
{yellowBox}
{logBox}
</View>
</RootTagContext.Provider>
);
@@ -147,8 +148,8 @@ const styles = StyleSheet.create({
if (__DEV__) {
if (!global.__RCTProfileIsProfiling) {
const YellowBox = require('../YellowBox/YellowBox');
YellowBox.install();
const LogBox = require('../LogBox/LogBox');
LogBox.install();
}
}