MCPcopy Create free account
hub / github.com/react/react / storeAsGlobal

Function storeAsGlobal

packages/react-devtools-shared/src/backend/legacy/renderer.js:713–728  ·  view source on GitHub ↗
(
    id: number,
    path: Array<string | number>,
    count: number,
  )

Source from the content-addressed store, hash-verified

711 }
712
713 function storeAsGlobal(
714 id: number,
715 path: Array<string | number>,
716 count: number,
717 ): void {
718 const inspectedElement = inspectElementRaw(id);
719 if (inspectedElement !== null) {
720 const value = getInObject(inspectedElement, path);
721 const key = `$reactTemp${count}`;
722
723 window[key] = value;
724
725 console.log(key);
726 console.log(value);
727 }
728 }
729
730 function getSerializedElementValueByPath(
731 id: number,

Callers

nothing calls this directly

Calls 2

getInObjectFunction · 0.90
inspectElementRawFunction · 0.70

Tested by

no test coverage detected