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

Function storeAsGlobal

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

Source from the content-addressed store, hash-verified

7009 }
7010
7011 function storeAsGlobal(
7012 id: number,
7013 path: Array<string | number>,
7014 count: number,
7015 ): void {
7016 if (isMostRecentlyInspectedElement(id)) {
7017 const value = getInObject(
7018 ((mostRecentlyInspectedElement: any): InspectedElement),
7019 path,
7020 );
7021 const key = `$reactTemp${count}`;
7022
7023 window[key] = value;
7024
7025 console.log(key);
7026 console.log(value);
7027 }
7028 }
7029
7030 function getSerializedElementValueByPath(
7031 id: number,

Callers 1

Calls 2

getInObjectFunction · 0.90

Tested by

no test coverage detected