remove yellow box from systrace
Reviewed By: alexeylang Differential Revision: D5024794 fbshipit-source-id: 5551135c16adb6f93d2f5957171f41d63b9a6bf9
This commit is contained in:
parent
c7317c5e61
commit
d334cdd590
|
@ -52,26 +52,28 @@ class AppContainer extends React.Component {
|
|||
|
||||
componentDidMount(): void {
|
||||
if (__DEV__) {
|
||||
this._subscription = RCTDeviceEventEmitter.addListener(
|
||||
'toggleElementInspector',
|
||||
() => {
|
||||
const Inspector = require('Inspector');
|
||||
const inspector = this.state.inspector
|
||||
? null
|
||||
: <Inspector
|
||||
inspectedViewTag={ReactNative.findNodeHandle(this._mainRef)}
|
||||
onRequestRerenderApp={(updateInspectedViewTag) => {
|
||||
this.setState(
|
||||
(s) => ({mainKey: s.mainKey + 1}),
|
||||
() => updateInspectedViewTag(
|
||||
ReactNative.findNodeHandle(this._mainRef)
|
||||
)
|
||||
);
|
||||
}}
|
||||
/>;
|
||||
this.setState({inspector});
|
||||
},
|
||||
);
|
||||
if (global.__RCTProfileIsProfiling) {
|
||||
this._subscription = RCTDeviceEventEmitter.addListener(
|
||||
'toggleElementInspector',
|
||||
() => {
|
||||
const Inspector = require('Inspector');
|
||||
const inspector = this.state.inspector
|
||||
? null
|
||||
: <Inspector
|
||||
inspectedViewTag={ReactNative.findNodeHandle(this._mainRef)}
|
||||
onRequestRerenderApp={(updateInspectedViewTag) => {
|
||||
this.setState(
|
||||
(s) => ({mainKey: s.mainKey + 1}),
|
||||
() => updateInspectedViewTag(
|
||||
ReactNative.findNodeHandle(this._mainRef)
|
||||
)
|
||||
);
|
||||
}}
|
||||
/>;
|
||||
this.setState({inspector});
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,8 +86,10 @@ class AppContainer extends React.Component {
|
|||
render(): React.Element<*> {
|
||||
let yellowBox = null;
|
||||
if (__DEV__) {
|
||||
const YellowBox = require('YellowBox');
|
||||
yellowBox = <YellowBox />;
|
||||
if (!global.__RCTProfileIsProfiling) {
|
||||
const YellowBox = require('YellowBox');
|
||||
yellowBox = <YellowBox />;
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
Loading…
Reference in New Issue