Skip to content

Commit 0f98041

Browse files
rubennortefacebook-github-bot
authored andcommitted
Add option to disable inspector in AppContainer to avoid showing it in nested AppContainer views
Summary: Changelog: [internal] Reviewed By: jacdebug Differential Revision: D39383213 fbshipit-source-id: 1e3cb7e2d72df1ddbc254c789bd10b12229fe1ae
1 parent 460153f commit 0f98041

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Libraries/ReactNative/AppContainer.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ type Props = $ReadOnly<{|
2525
showArchitectureIndicator?: boolean,
2626
WrapperComponent?: ?React.ComponentType<any>,
2727
internal_excludeLogBox?: ?boolean,
28+
internal_excludeInspector?: ?boolean,
2829
|}>;
2930

3031
type State = {|
@@ -48,7 +49,10 @@ class AppContainer extends React.Component<Props, State> {
4849

4950
componentDidMount(): void {
5051
if (__DEV__) {
51-
if (!global.__RCTProfileIsProfiling) {
52+
if (
53+
!global.__RCTProfileIsProfiling &&
54+
!this.props.internal_excludeInspector
55+
) {
5256
this._subscription = RCTDeviceEventEmitter.addListener(
5357
'toggleElementInspector',
5458
() => {

0 commit comments

Comments
 (0)