File tree 2 files changed +4
-0
lines changed
packages/react-native-renderer/src 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import {
24
24
import { enableGetInspectorDataForInstanceInProduction } from 'shared/ReactFeatureFlags' ;
25
25
import { getClosestInstanceFromNode } from './ReactNativeComponentTree' ;
26
26
import { getNodeFromInternalInstanceHandle } from './ReactNativePublicCompat' ;
27
+ import { getStackByFiberInDevAndProd } from 'react-reconciler/src/ReactFiberComponentStack' ;
27
28
28
29
const emptyObject = { } ;
29
30
if ( __DEV__ ) {
@@ -106,12 +107,14 @@ function getInspectorDataForInstance(
106
107
const hierarchy = createHierarchy ( fiberHierarchy ) ;
107
108
const props = getHostProps ( instance ) ;
108
109
const selectedIndex = fiberHierarchy . indexOf ( instance ) ;
110
+ const componentStack = getStackByFiberInDevAndProd ( fiber ) ;
109
111
110
112
return {
111
113
closestInstance : instance ,
112
114
hierarchy,
113
115
props,
114
116
selectedIndex,
117
+ componentStack,
115
118
} ;
116
119
}
117
120
Original file line number Diff line number Diff line change @@ -159,6 +159,7 @@ export type InspectorData = $ReadOnly<{
159
159
} > ,
160
160
selectedIndex : ?number ,
161
161
props : InspectorDataProps ,
162
+ componentStack : string ,
162
163
} > ;
163
164
164
165
export type TouchedViewDataAtPoint = $ReadOnly < {
You can’t perform that action at this time.
0 commit comments