dillon1000/react
Commit
Browse files refactor[renderer]: expose getInspectorDataForInstance in rendererConfig (#26913)
## Summary This is required for the case when we have an instance and want to get inspector data for it. Such case occurs when RN's application being debugged via React DevTools. React DevTools sends instance to RN, which then gets all auxiliary data to highlight some elements. Having `getInspectorDataForInstance` method exposed makes it possible to easily get current props from fiber, which then can be used to display some margins & paddings for hovered element (via props.style). I see that `getInspectorDataForInstance` is being exported at the top level of the renderer, but feels like this should also be inside DevTools global hook, the same way we use it for [`getInspectorDataForViewAtPoint`](https://github.com/facebook/react-native/blob/e7d3662904e0e35e43380ee6d54859388713a592/packages/react-native/Libraries/Inspector/getInspectorDataForViewAtPoint.js).
Changed paths5 files
First-parent comparisonpackages/react-native-renderer/src/ReactFabric.js ModifiedM packages/react-native-renderer/src/ReactFiberConfigFabric.js ModifiedM packages/react-native-renderer/src/ReactFiberConfigNative.js ModifiedM packages/react-native-renderer/src/ReactNativeFiberInspector.js ModifiedM packages/react-native-renderer/src/ReactNativeRenderer.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…