Skip to content

Commit

Permalink
Move architecture indicator to internal only
Browse files Browse the repository at this point in the history
Summary: Since it's only relevant/used internally at FB.

Reviewed By: JoshuaGross

Differential Revision: D17273015

fbshipit-source-id: 0ac6cc48d1c7625c5c867fd8b3a896b44b2b9940
  • Loading branch information
fkgozali authored and facebook-github-bot committed Sep 10, 2019
1 parent d0c618a commit e92235d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 68 deletions.
12 changes: 11 additions & 1 deletion Libraries/ReactNative/AppContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ type Context = {

type Props = $ReadOnly<{|
children?: React.Node,
fabric?: boolean,
rootTag: number,
showArchitectureIndicator?: boolean,
WrapperComponent?: ?React.ComponentType<any>,
|}>;

Expand Down Expand Up @@ -112,7 +114,15 @@ class AppContainer extends React.Component<Props, State> {

const Wrapper = this.props.WrapperComponent;
if (Wrapper != null) {
innerView = <Wrapper>{innerView}</Wrapper>;
innerView = (
<Wrapper
fabric={this.props.fabric === true}
showArchitectureIndicator={
this.props.showArchitectureIndicator === true
}>
{innerView}
</Wrapper>
);
}
return (
<RootTagContext.Provider value={this.props.rootTag}>
Expand Down
62 changes: 0 additions & 62 deletions Libraries/ReactNative/ReactNativeArchitectureIndicator.js

This file was deleted.

10 changes: 5 additions & 5 deletions Libraries/ReactNative/renderApplication.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import GlobalPerformanceLogger from '../Utilities/GlobalPerformanceLogger';
import type {IPerformanceLogger} from '../Utilities/createPerformanceLogger';
import PerformanceLoggerContext from '../Utilities/PerformanceLoggerContext';
const React = require('react');
const ReactNativeArchitectureIndicator = require('./ReactNativeArchitectureIndicator');

const invariant = require('invariant');

Expand All @@ -36,11 +35,12 @@ function renderApplication<Props: Object>(
const renderable = (
<PerformanceLoggerContext.Provider
value={scopedPerformanceLogger ?? GlobalPerformanceLogger}>
<AppContainer rootTag={rootTag} WrapperComponent={WrapperComponent}>
<AppContainer
rootTag={rootTag}
fabric={fabric}
showArchitectureIndicator={showArchitectureIndicator}
WrapperComponent={WrapperComponent}>
<RootComponent {...initialProps} rootTag={rootTag} />
{showArchitectureIndicator === true ? (
<ReactNativeArchitectureIndicator fabric={!!fabric} />
) : null}
</AppContainer>
</PerformanceLoggerContext.Provider>
);
Expand Down

0 comments on commit e92235d

Please sign in to comment.