Home / Function/ transformScope() — react Function Reference

transformScope() — react Function Reference

Architecture documentation for the transformScope() function in PruneAllReactiveScopes.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  2be70513_8f10_6e51_ae23_94cfbef6ca0e["transformScope()"]
  1e81d1ca_2f66_a580_3636_c8afcfa0fd20["Transform"]
  2be70513_8f10_6e51_ae23_94cfbef6ca0e -->|defined in| 1e81d1ca_2f66_a580_3636_c8afcfa0fd20
  4acb57df_5348_9aab_9691_41cf35127db4["visitScope()"]
  2be70513_8f10_6e51_ae23_94cfbef6ca0e -->|calls| 4acb57df_5348_9aab_9691_41cf35127db4
  b639747b_32c3_a4bf_867f_dba5d3901073["transformScope()"]
  2be70513_8f10_6e51_ae23_94cfbef6ca0e -->|calls| b639747b_32c3_a4bf_867f_dba5d3901073
  style 2be70513_8f10_6e51_ae23_94cfbef6ca0e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PruneAllReactiveScopes.ts lines 29–35

  override transformScope(
    scopeBlock: ReactiveScopeBlock,
    state: void,
  ): Transformed<ReactiveStatement> {
    this.visitScope(scopeBlock, state);
    return {kind: 'replace-many', value: scopeBlock.instructions};
  }

Domain

Subdomains

Frequently Asked Questions

What does transformScope() do?
transformScope() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PruneAllReactiveScopes.ts.
Where is transformScope() defined?
transformScope() is defined in compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PruneAllReactiveScopes.ts at line 29.
What does transformScope() call?
transformScope() calls 2 function(s): transformScope, visitScope.

Analyze Your Own Codebase

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

Try Supermodel Free