Home / Function/ renameVariables() — react Function Reference

renameVariables() — react Function Reference

Architecture documentation for the renameVariables() function in RenameVariables.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  4ab9e061_3bbc_1bfe_a31f_6b25dd9e56cd["renameVariables()"]
  a67a8ce3_d9a8_a740_fb57_bc90354f75e7["RenameVariables.ts"]
  4ab9e061_3bbc_1bfe_a31f_6b25dd9e56cd -->|defined in| a67a8ce3_d9a8_a740_fb57_bc90354f75e7
  c56dfea4_2f2d_7a14_318e_471dcde25f80["collectReferencedGlobals()"]
  4ab9e061_3bbc_1bfe_a31f_6b25dd9e56cd -->|calls| c56dfea4_2f2d_7a14_318e_471dcde25f80
  b95a6a8b_8071_1164_fd41_4d42b52d9ea3["renameVariablesImpl()"]
  4ab9e061_3bbc_1bfe_a31f_6b25dd9e56cd -->|calls| b95a6a8b_8071_1164_fd41_4d42b52d9ea3
  style 4ab9e061_3bbc_1bfe_a31f_6b25dd9e56cd fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/RenameVariables.ts lines 50–55

export function renameVariables(fn: ReactiveFunction): Set<string> {
  const globals = collectReferencedGlobals(fn);
  const scopes = new Scopes(globals, fn.env.programContext);
  renameVariablesImpl(fn, new Visitor(), scopes);
  return new Set([...scopes.names, ...globals]);
}

Domain

Subdomains

Frequently Asked Questions

What does renameVariables() do?
renameVariables() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/RenameVariables.ts.
Where is renameVariables() defined?
renameVariables() is defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/RenameVariables.ts at line 50.
What does renameVariables() call?
renameVariables() calls 2 function(s): collectReferencedGlobals, renameVariablesImpl.

Analyze Your Own Codebase

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

Try Supermodel Free