Stop spamming highlight events when a component is selected (#25448)

This commit is contained in:
Tianyu Yao
2022-12-03 09:52:03 -05:00
committed by Rick Hanlon
parent 338ba683d3
commit ce0fdc74b5
-15
View File
@@ -131,21 +131,6 @@ export function connectToDevTools(options: ?ConnectOptions) {
}
},
});
bridge.addListener(
'inspectElement',
({id, rendererID}: {id: number, rendererID: number, ...}) => {
const renderer = agent.rendererInterfaces[rendererID];
if (renderer != null) {
// Send event for RN to highlight.
const nodes: ?Array<HTMLElement> = renderer.findNativeNodesForFiberID(
id,
);
if (nodes != null && nodes[0] != null) {
agent.emit('showNativeHighlight', nodes[0]);
}
}
},
);
// $FlowFixMe[incompatible-use] found when upgrading Flow
bridge.addListener(
'updateComponentFilters',