Skip to content

Commit

Permalink
Stop spamming highlight events when a component is selected (facebook…
Browse files Browse the repository at this point in the history
  • Loading branch information
tyao1 authored Oct 14, 2022
1 parent 08d035b commit fd31724
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions packages/react-devtools-core/src/backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit fd31724

Please sign in to comment.