Skip to content

Commit

Permalink
Remove unused rootTag
Browse files Browse the repository at this point in the history
Summary:
`rootTag` is a lie, it's passed around but never actually used. IIRC
`findInstanceByNativeTag` needed it but seems like not anymore.

Reviewed By: spicyj

Differential Revision: D3382144

fbshipit-source-id: eb96870a3848333e66bf045e78e95c7763812cc4
  • Loading branch information
frantic authored and Facebook Github Bot 8 committed Jun 8, 2016
1 parent f26c908 commit 30e9c40
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 6 deletions.
2 changes: 0 additions & 2 deletions Libraries/Inspector/Inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ if (window.__REACT_DEVTOOLS_GLOBAL_HOOK__) {
class Inspector extends React.Component {
props: {
inspectedViewTag: ?number,
rootTag: ?number,
onRequestRerenderApp: (callback: (tag: ?number) => void) => void
};

Expand Down Expand Up @@ -198,7 +197,6 @@ class Inspector extends React.Component {
<View style={styles.container} pointerEvents="box-none">
{this.state.inspecting &&
<InspectorOverlay
rootTag={this.props.rootTag}
inspected={this.state.inspected}
inspectedViewTag={this.state.inspectedViewTag}
onTouchInstance={this.onTouchInstance.bind(this)}
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Inspector/InspectorOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var InspectorOverlay = React.createClass({
this.props.inspectedViewTag,
[locationX, locationY],
(nativeViewTag, left, top, width, height) => {
var instance = InspectorUtils.findInstanceByNativeTag(this.props.rootTag, nativeViewTag);
var instance = InspectorUtils.findInstanceByNativeTag(nativeViewTag);
if (!instance) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Inspector/InspectorUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function traverseOwnerTreeUp(hierarchy, instance) {
}
}

function findInstanceByNativeTag(rootTag, nativeTag) {
function findInstanceByNativeTag(nativeTag) {
return ReactNativeComponentTree.getInstanceFromNode(nativeTag);
}

Expand Down
1 change: 0 additions & 1 deletion Libraries/ReactIOS/AppContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ var AppContainer = React.createClass({
var inspector = !__DEV__ || this.state.inspector
? null
: <Inspector
rootTag={this.props.rootTag}
inspectedViewTag={ReactNative.findNodeHandle(this.refs.main)}
onRequestRerenderApp={(updateInspectedViewTag) => {
this.setState(
Expand Down
2 changes: 1 addition & 1 deletion Libraries/ReactIOS/renderApplication.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function renderApplication<P>(
'Expect to have a valid rootTag, instead got ', rootTag
);
ReactNative.render(
<AppContainer rootTag={rootTag}>
<AppContainer>
<RootComponent
{...initialProps}
rootTag={rootTag}
Expand Down

0 comments on commit 30e9c40

Please sign in to comment.