refactor[AppContainer]: remove unused hasError (#38623)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38623

Changelog: [Internal]

Looks like this field is unused.

Reviewed By: robhogan

Differential Revision: D47758294

fbshipit-source-id: 5bf9f8c11eba07a2074290b2b35f4432c80eaa5d
This commit is contained in:
Ruslan Lesiutin
2023-07-26 10:24:09 -07:00
committed by Facebook GitHub Bot
parent 3c6dbec23b
commit b96d3beb3d
@@ -34,7 +34,6 @@ type State = {|
devtoolsOverlay: ?React.Node,
traceUpdateOverlay: ?React.Node,
mainKey: number,
hasError: boolean,
|};
class AppContainer extends React.Component<Props, State> {
@@ -43,7 +42,6 @@ class AppContainer extends React.Component<Props, State> {
devtoolsOverlay: null,
traceUpdateOverlay: null,
mainKey: 1,
hasError: false,
};
_mainRef: ?React.ElementRef<typeof View>;
_subscription: ?EventSubscription = null;
@@ -128,10 +126,11 @@ class AppContainer extends React.Component<Props, State> {
</Wrapper>
);
}
return (
<RootTagContext.Provider value={createRootTag(this.props.rootTag)}>
<View style={styles.appContainer} pointerEvents="box-none">
{!this.state.hasError && innerView}
{innerView}
{this.state.traceUpdateOverlay}
{this.state.devtoolsOverlay}
{this.state.inspector}