loadSourceAndMetadata() — react Function Reference
Architecture documentation for the loadSourceAndMetadata() function in loadSourceAndMetadata.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD c1ede884_eff1_5699_b978_8ab7d7207919["loadSourceAndMetadata()"] c387cbce_0129_194c_6a44_3db01fd37956["loadSourceAndMetadata.js"] c1ede884_eff1_5699_b978_8ab7d7207919 -->|defined in| c387cbce_0129_194c_6a44_3db01fd37956 2e3c3d6a_54ee_ebd5_f164_d4b8a5fcf4a9["return()"] 2e3c3d6a_54ee_ebd5_f164_d4b8a5fcf4a9 -->|calls| c1ede884_eff1_5699_b978_8ab7d7207919 af50a88a_0828_5d3a_feb9_e7a9a1f805c9["extractAndLoadSourceMapJSON()"] c1ede884_eff1_5699_b978_8ab7d7207919 -->|calls| af50a88a_0828_5d3a_feb9_e7a9a1f805c9 style c1ede884_eff1_5699_b978_8ab7d7207919 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-devtools-shared/src/hooks/parseHookNames/loadSourceAndMetadata.js lines 97–119
export async function loadSourceAndMetadata(
hooksList: HooksList,
fetchFileWithCaching: FetchFileWithCaching | null,
): Promise<LocationKeyToHookSourceAndMetadata> {
return withAsyncPerfMeasurements('loadSourceAndMetadata()', async () => {
const locationKeyToHookSourceAndMetadata = withSyncPerfMeasurements(
'initializeHookSourceAndMetadata',
() => initializeHookSourceAndMetadata(hooksList),
);
await withAsyncPerfMeasurements('loadSourceFiles()', () =>
loadSourceFiles(locationKeyToHookSourceAndMetadata, fetchFileWithCaching),
);
await withAsyncPerfMeasurements('extractAndLoadSourceMapJSON()', () =>
extractAndLoadSourceMapJSON(locationKeyToHookSourceAndMetadata),
);
// At this point, we've loaded JS source (text) and source map (JSON).
// The remaining works (parsing these) is CPU intensive and should be done in a worker.
return locationKeyToHookSourceAndMetadata;
});
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does loadSourceAndMetadata() do?
loadSourceAndMetadata() is a function in the react codebase, defined in packages/react-devtools-shared/src/hooks/parseHookNames/loadSourceAndMetadata.js.
Where is loadSourceAndMetadata() defined?
loadSourceAndMetadata() is defined in packages/react-devtools-shared/src/hooks/parseHookNames/loadSourceAndMetadata.js at line 97.
What does loadSourceAndMetadata() call?
loadSourceAndMetadata() calls 1 function(s): extractAndLoadSourceMapJSON.
What calls loadSourceAndMetadata()?
loadSourceAndMetadata() is called by 1 function(s): return.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free