Home / Function/ InspectedElementBadges() — react Function Reference

InspectedElementBadges() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  96fe9a6e_9e70_bef0_7ce0_b2431ac09b94["InspectedElementBadges()"]
  d5989364_e16c_e349_6082_7c3e50da7772["InspectedElementBadges.js"]
  96fe9a6e_9e70_bef0_7ce0_b2431ac09b94 -->|defined in| d5989364_e16c_e349_6082_7c3e50da7772
  style 96fe9a6e_9e70_bef0_7ce0_b2431ac09b94 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-shared/src/devtools/views/Components/InspectedElementBadges.js lines 24–48

export default function InspectedElementBadges({
  hocDisplayNames,
  compiledWithForget,
  nativeTag,
}: Props): React.Node {
  if (
    !compiledWithForget &&
    (hocDisplayNames == null || hocDisplayNames.length === 0) &&
    nativeTag === null
  ) {
    return null;
  }

  return (
    <div className={styles.Root}>
      {compiledWithForget && <ForgetBadge indexable={false} />}
      {nativeTag !== null && <NativeTagBadge nativeTag={nativeTag} />}

      {hocDisplayNames !== null &&
        hocDisplayNames.map(hocDisplayName => (
          <Badge key={hocDisplayName}>{hocDisplayName}</Badge>
        ))}
    </div>
  );
}

Domain

Subdomains

Frequently Asked Questions

What does InspectedElementBadges() do?
InspectedElementBadges() is a function in the react codebase, defined in packages/react-devtools-shared/src/devtools/views/Components/InspectedElementBadges.js.
Where is InspectedElementBadges() defined?
InspectedElementBadges() is defined in packages/react-devtools-shared/src/devtools/views/Components/InspectedElementBadges.js at line 24.

Analyze Your Own Codebase

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

Try Supermodel Free