MCPcopy Index your code
hub / github.com/react/react / getElementByID

Method getElementByID

packages/react-devtools-shared/src/devtools/store.js:612–620  ·  view source on GitHub ↗
(id: number)

Source from the content-addressed store, hash-verified

610 }
611
612 getElementByID(id: number): Element | null {
613 const element = this._idToElement.get(id);
614 if (element === undefined) {
615 console.warn(`No element found with id "${id}"`);
616 return null;
617 }
618
619 return element;
620 }
621
622 getSuspenseByID(id: SuspenseNode['id']): SuspenseNode | null {
623 const suspense = this._idToSuspense.get(id);

Callers 15

getIndexOfElementIDMethod · 0.95
isDescendantOfMethod · 0.95
toggleIsCollapsedMethod · 0.95
ProfilerStoreClass · 0.80
printStoreFunction · 0.80
useHighlightHostInstanceFunction · 0.80
useScrollToHostInstanceFunction · 0.80
handleKeyDownFunction · 0.80

Calls 1

getMethod · 0.65

Tested by

no test coverage detected