Skip to content

Commit 5eb8685

Browse files
hoxyqfacebook-github-bot
authored andcommitted
fix: use public instance in Fiber renderer and expose it from getInspectorDataForViewAtPoint (facebook#31068)
Summary: React DevTools no longer operates with just Fibers, it now builds its own Shadow Tree, which represents the tree on the Host (Fabric on Native, DOM on Web). We have to keep track of public instances for a select-to-inspect feature. We've recently changed this logic in facebook/react#30831, and looks like we've been incorrectly getting a public instance for Fabric case. Not only this, turns out that all `getInspectorData...` APIs are returning Fibers, and not public instances. I have to expose it, so that React DevTools can correctly identify the element, which was selected. Changes for React Native are in [D63421463](https://www.internalfb.com/diff/D63421463) DiffTrain build for commit facebook/react@d66fa02. Differential Revision: D63453667
1 parent 94b7793 commit 5eb8685

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/react-native/Libraries/Renderer/shims/ReactNativeTypes.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noformat
88
* @nolint
99
* @flow strict
10-
* @generated SignedSource<<3eb929731c259569c7af3b6479e486fe>>
10+
* @generated SignedSource<<b803401b6dd721b9caffdac1f8b6fd1c>>
1111
*/
1212

1313
import type {
@@ -180,6 +180,7 @@ export type TouchedViewDataAtPoint = $ReadOnly<{
180180
width: number,
181181
height: number,
182182
}>,
183+
closestPublicInstance?: PublicInstance,
183184
...InspectorData,
184185
}>;
185186

0 commit comments

Comments
 (0)