Home / Function/ addObject() — react Function Reference

addObject() — react Function Reference

Architecture documentation for the addObject() function in ObjectShape.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  fdd1014d_2fa9_cdec_af9b_b2e2bada1088["addObject()"]
  58f81300_7c82_5086_3e10_e46b5f3ab04d["ObjectShape.ts"]
  fdd1014d_2fa9_cdec_af9b_b2e2bada1088 -->|defined in| 58f81300_7c82_5086_3e10_e46b5f3ab04d
  b5df453b_1fe3_4bcb_9def_abba2aa3a9a4["installTypeConfig()"]
  b5df453b_1fe3_4bcb_9def_abba2aa3a9a4 -->|calls| fdd1014d_2fa9_cdec_af9b_b2e2bada1088
  4ba5c3ad_186f_8c38_7db0_a6d2e5ee2b25["getReanimatedModuleType()"]
  4ba5c3ad_186f_8c38_7db0_a6d2e5ee2b25 -->|calls| fdd1014d_2fa9_cdec_af9b_b2e2bada1088
  d48f103d_be9e_0e54_7379_d248244a3c09["createAnonId()"]
  fdd1014d_2fa9_cdec_af9b_b2e2bada1088 -->|calls| d48f103d_be9e_0e54_7379_d248244a3c09
  54994d7a_c3e1_1a38_0769_4562dd8f15b4["addShape()"]
  fdd1014d_2fa9_cdec_af9b_b2e2bada1088 -->|calls| 54994d7a_c3e1_1a38_0769_4562dd8f15b4
  style fdd1014d_2fa9_cdec_af9b_b2e2bada1088 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/HIR/ObjectShape.ts lines 241–252

export function addObject(
  registry: ShapeRegistry,
  id: string | null,
  properties: Iterable<[string, BuiltInType | PolyType]>,
): ObjectType {
  const shapeId = id ?? createAnonId();
  addShape(registry, shapeId, properties, null);
  return {
    kind: 'Object',
    shapeId,
  };
}

Subdomains

Frequently Asked Questions

What does addObject() do?
addObject() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/ObjectShape.ts.
Where is addObject() defined?
addObject() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/ObjectShape.ts at line 241.
What does addObject() call?
addObject() calls 2 function(s): addShape, createAnonId.
What calls addObject()?
addObject() is called by 2 function(s): getReanimatedModuleType, installTypeConfig.

Analyze Your Own Codebase

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

Try Supermodel Free