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 17:57:55 -08:00 коммит произвёл Facebook Github Bot
Родитель da9364fa3e
Коммит a83ea6ab8c
2 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -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,

Просмотреть файл

@ -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();
}
}