Home / Function/ TooltipThrownError() — react Function Reference

TooltipThrownError() — react Function Reference

Architecture documentation for the TooltipThrownError() function in EventTooltip.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  101b2b32_0025_6354_07e3_6e2d0fe57734["TooltipThrownError()"]
  57dc23c0_c74d_e09e_ad1f_116cb590a38c["EventTooltip.js"]
  101b2b32_0025_6354_07e3_6e2d0fe57734 -->|defined in| 57dc23c0_c74d_e09e_ad1f_116cb590a38c
  9b5bb02f_1f54_393f_07e9_6f895ce3958a["trimString()"]
  101b2b32_0025_6354_07e3_6e2d0fe57734 -->|calls| 9b5bb02f_1f54_393f_07e9_6f895ce3958a
  5ec23e51_b01a_6d75_3953_f12a0c47408d["formatTimestamp()"]
  101b2b32_0025_6354_07e3_6e2d0fe57734 -->|calls| 5ec23e51_b01a_6d75_3953_f12a0c47408d
  style 101b2b32_0025_6354_07e3_6e2d0fe57734 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-timeline/src/EventTooltip.js lines 489–513

const TooltipThrownError = ({thrownError}: {thrownError: ThrownError}) => {
  const {componentName, message, phase, timestamp} = thrownError;
  const label = `threw an error during ${phase}`;
  return (
    <div className={styles.TooltipSection}>
      {componentName && (
        <span className={styles.ComponentName}>
          {trimString(componentName, 100)}
        </span>
      )}
      <span className={styles.UserTimingLabel}>{label}</span>
      <div className={styles.Divider} />
      <div className={styles.DetailsGrid}>
        <div className={styles.DetailsGridLabel}>Timestamp:</div>
        <div>{formatTimestamp(timestamp)}</div>
        {message !== '' && (
          <>
            <div className={styles.DetailsGridLabel}>Error:</div>
            <div>{message}</div>
          </>
        )}
      </div>
    </div>
  );
};

Domain

Subdomains

Frequently Asked Questions

What does TooltipThrownError() do?
TooltipThrownError() is a function in the react codebase, defined in packages/react-devtools-timeline/src/EventTooltip.js.
Where is TooltipThrownError() defined?
TooltipThrownError() is defined in packages/react-devtools-timeline/src/EventTooltip.js at line 489.
What does TooltipThrownError() call?
TooltipThrownError() calls 2 function(s): formatTimestamp, trimString.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free