Home / Function/ makeOrMergeProperty() — react Function Reference

makeOrMergeProperty() — react Function Reference

Architecture documentation for the makeOrMergeProperty() function in DeriveMinimalDependenciesHIR.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  38ab4c9b_814c_2f1c_3661_630e72f557fd["makeOrMergeProperty()"]
  686094a4_f90a_6b2e_949a_aa03f03b5c66["DeriveMinimalDependenciesHIR.ts"]
  38ab4c9b_814c_2f1c_3661_630e72f557fd -->|defined in| 686094a4_f90a_6b2e_949a_aa03f03b5c66
  61f036d0_eb91_7e31_154e_acb3c7c8f23c["addDependency()"]
  61f036d0_eb91_7e31_154e_acb3c7c8f23c -->|calls| 38ab4c9b_814c_2f1c_3661_630e72f557fd
  fde4af26_13b5_6adc_3afe_f724f66c9a93["merge()"]
  38ab4c9b_814c_2f1c_3661_630e72f557fd -->|calls| fde4af26_13b5_6adc_3afe_f724f66c9a93
  style 38ab4c9b_814c_2f1c_3661_630e72f557fd fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/HIR/DeriveMinimalDependenciesHIR.ts lines 361–377

function makeOrMergeProperty(
  node: DependencyNode,
  property: PropertyLiteral,
  accessType: PropertyAccessType,
): DependencyNode {
  let child = node.properties.get(property);
  if (child == null) {
    child = {
      properties: new Map(),
      accessType,
    };
    node.properties.set(property, child);
  } else {
    child.accessType = merge(child.accessType, accessType);
  }
  return child;
}

Subdomains

Calls

Called By

Frequently Asked Questions

What does makeOrMergeProperty() do?
makeOrMergeProperty() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/DeriveMinimalDependenciesHIR.ts.
Where is makeOrMergeProperty() defined?
makeOrMergeProperty() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/DeriveMinimalDependenciesHIR.ts at line 361.
What does makeOrMergeProperty() call?
makeOrMergeProperty() calls 1 function(s): merge.
What calls makeOrMergeProperty()?
makeOrMergeProperty() is called by 1 function(s): addDependency.

Analyze Your Own Codebase

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

Try Supermodel Free