logComponentAwait() — react Function Reference
Architecture documentation for the logComponentAwait() function in ReactFlightPerformanceTrack.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 9451f4fe_f2bc_9af9_1665_335f6e9fbde4["logComponentAwait()"] e5244d6e_35d7_7c99_420d_82c7be8fe931["ReactFlightPerformanceTrack.js"] 9451f4fe_f2bc_9af9_1665_335f6e9fbde4 -->|defined in| e5244d6e_35d7_7c99_420d_82c7be8fe931 1fae0211_be70_95cf_fc81_b888b3d13b71["getIOShortName()"] 9451f4fe_f2bc_9af9_1665_335f6e9fbde4 -->|calls| 1fae0211_be70_95cf_fc81_b888b3d13b71 7213be43_ce6c_ee41_dfb0_f5644c0fb421["getIOLongName()"] 9451f4fe_f2bc_9af9_1665_335f6e9fbde4 -->|calls| 7213be43_ce6c_ee41_dfb0_f5644c0fb421 style 9451f4fe_f2bc_9af9_1665_335f6e9fbde4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-client/src/ReactFlightPerformanceTrack.js lines 480–540
export function logComponentAwait(
asyncInfo: ReactAsyncInfo,
trackIdx: number,
startTime: number,
endTime: number,
rootEnv: string,
value: mixed,
): void {
if (supportsUserTiming && endTime > 0) {
const description = getIODescription(value);
const name = getIOShortName(
asyncInfo.awaited,
description,
asyncInfo.env,
rootEnv,
);
const entryName = 'await ' + name;
const color = getIOColor(name);
const debugTask = asyncInfo.debugTask || asyncInfo.awaited.debugTask;
if (__DEV__ && debugTask) {
const properties: Array<[string, string]> = [];
if (typeof value === 'object' && value !== null) {
addObjectToProperties(value, properties, 0, '');
} else if (value !== undefined) {
addValueToProperties('awaited value', value, properties, 0, '');
}
const tooltipText = getIOLongName(
asyncInfo.awaited,
description,
asyncInfo.env,
rootEnv,
);
debugTask.run(
// $FlowFixMe[method-unbinding]
performance.measure.bind(performance, entryName, {
start: startTime < 0 ? 0 : startTime,
end: endTime,
detail: {
devtools: {
color: color,
track: trackNames[trackIdx],
trackGroup: COMPONENTS_TRACK,
properties,
tooltipText,
},
},
}),
);
performance.clearMeasures(entryName);
} else {
console.timeStamp(
entryName,
startTime < 0 ? 0 : startTime,
endTime,
trackNames[trackIdx],
COMPONENTS_TRACK,
color,
);
}
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does logComponentAwait() do?
logComponentAwait() is a function in the react codebase, defined in packages/react-client/src/ReactFlightPerformanceTrack.js.
Where is logComponentAwait() defined?
logComponentAwait() is defined in packages/react-client/src/ReactFlightPerformanceTrack.js at line 480.
What does logComponentAwait() call?
logComponentAwait() calls 2 function(s): getIOLongName, getIOShortName.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free