MCPcopy
hub / github.com/benjitaylor/agentation / getFiberFromElement

Function getFiberFromElement

package/src/utils/react-detection.ts:451–457  ·  view source on GitHub ↗
(element: HTMLElement)

Source from the content-addressed store, hash-verified

449}
450
451function getFiberFromElement(element: HTMLElement): ReactFiber | null {
452 const key = getReactFiberKey(element);
453 if (!key) return null;
454 return (element as unknown as Record<string, unknown>)[
455 key
456 ] as ReactFiber | null;
457}
458
459function getComponentNameFromType(type: ComponentType | null): string | null {
460 if (!type) return null;

Callers 1

getReactComponentNameFunction · 0.70

Calls 1

getReactFiberKeyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…