MCPcopy
hub / github.com/facebook/react / getIOColor

Function getIOColor

packages/react-client/src/ReactFlightPerformanceTrack.js:291–303  ·  view source on GitHub ↗
(
  functionName: string,
)

Source from the content-addressed store, hash-verified

289}
290
291function getIOColor(
292 functionName: string,
293): 'tertiary-light' | 'tertiary' | 'tertiary-dark' {
294 // Add some color variation to be able to distinguish various sources.
295 switch (functionName.charCodeAt(0) % 3) {
296 case 0:
297 return 'tertiary-light';
298 case 1:
299 return 'tertiary';
300 default:
301 return 'tertiary-dark';
302 }
303}
304
305function getIOLongName(
306 ioInfo: ReactIOInfo,

Callers 2

logComponentAwaitFunction · 0.85
logIOInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected