Home / Function/ elementID() — react Function Reference

elementID() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  e57f7f22_d562_85c0_a99c_f9e962f69343["elementID()"]
  2cad2931_d886_3543_16aa_1fcd5445f7bd["ProfilerStore.js"]
  e57f7f22_d562_85c0_a99c_f9e962f69343 -->|defined in| 2cad2931_d886_3543_16aa_1fcd5445f7bd
  style e57f7f22_d562_85c0_a99c_f9e962f69343 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-shared/src/devtools/ProfilerStore.js lines 226–244

  ) => void = (elementID, profilingSnapshots) => {
    const element = this._store.getElementByID(elementID);
    if (element !== null) {
      const snapshotNode: SnapshotNode = {
        id: elementID,
        children: element.children.slice(0),
        displayName: element.displayName,
        hocDisplayNames: element.hocDisplayNames,
        key: element.key,
        type: element.type,
        compiledWithForget: element.compiledWithForget,
      };
      profilingSnapshots.set(elementID, snapshotNode);

      element.children.forEach(childID =>
        this._takeProfilingSnapshotRecursive(childID, profilingSnapshots),
      );
    }
  };

Domain

Subdomains

Frequently Asked Questions

What does elementID() do?
elementID() is a function in the react codebase, defined in packages/react-devtools-shared/src/devtools/ProfilerStore.js.
Where is elementID() defined?
elementID() is defined in packages/react-devtools-shared/src/devtools/ProfilerStore.js at line 226.

Analyze Your Own Codebase

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

Try Supermodel Free