Home / Function/ promoteTemporaryJsxTag() — react Function Reference

promoteTemporaryJsxTag() — react Function Reference

Architecture documentation for the promoteTemporaryJsxTag() function in HIR.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  a7ddd29d_1b90_49b2_fa66_2f273856b02a["promoteTemporaryJsxTag()"]
  18a78965_f593_105b_e5e8_07001321c2ec["HIR.ts"]
  a7ddd29d_1b90_49b2_fa66_2f273856b02a -->|defined in| 18a78965_f593_105b_e5e8_07001321c2ec
  4f0ce99a_8a69_a28c_c773_f27e4a7c167c["emitOutlinedJsx()"]
  4f0ce99a_8a69_a28c_c773_f27e4a7c167c -->|calls| a7ddd29d_1b90_49b2_fa66_2f273856b02a
  81fadb8d_22f1_6208_bbd3_8af4016beda9["promoteIdentifier()"]
  81fadb8d_22f1_6208_bbd3_8af4016beda9 -->|calls| a7ddd29d_1b90_49b2_fa66_2f273856b02a
  041ca752_10c1_3cda_1f5c_02f44a01310e["invariant()"]
  a7ddd29d_1b90_49b2_fa66_2f273856b02a -->|calls| 041ca752_10c1_3cda_1f5c_02f44a01310e
  style a7ddd29d_1b90_49b2_fa66_2f273856b02a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts lines 1395–1405

export function promoteTemporaryJsxTag(identifier: Identifier): void {
  CompilerError.invariant(identifier.name === null, {
    reason: `Expected a temporary (unnamed) identifier`,
    description: `Identifier already has a name, \`${identifier.name}\``,
    loc: GeneratedSource,
  });
  identifier.name = {
    kind: 'promoted',
    value: `#T${identifier.declarationId}`,
  };
}

Subdomains

Calls

Frequently Asked Questions

What does promoteTemporaryJsxTag() do?
promoteTemporaryJsxTag() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts.
Where is promoteTemporaryJsxTag() defined?
promoteTemporaryJsxTag() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/HIR.ts at line 1395.
What does promoteTemporaryJsxTag() call?
promoteTemporaryJsxTag() calls 1 function(s): invariant.
What calls promoteTemporaryJsxTag()?
promoteTemporaryJsxTag() is called by 2 function(s): emitOutlinedJsx, promoteIdentifier.

Analyze Your Own Codebase

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

Try Supermodel Free