Home / Function/ enterInnerFn() — react Function Reference

enterInnerFn() — react Function Reference

Architecture documentation for the enterInnerFn() function in PropagateScopeDependenciesHIR.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  dce98121_98e8_b5f8_3c93_a1b31e993439["enterInnerFn()"]
  1be3b542_2ecf_364c_adef_6e5675b7385e["DependencyCollectionContext"]
  dce98121_98e8_b5f8_3c93_a1b31e993439 -->|defined in| 1be3b542_2ecf_364c_adef_6e5675b7385e
  5b709ffb_65e9_2125_d608_a351c667cd6c["collectDependencies()"]
  5b709ffb_65e9_2125_d608_a351c667cd6c -->|calls| dce98121_98e8_b5f8_3c93_a1b31e993439
  ad17cc28_c934_cf1a_ce40_409d2c34592d["inferDependenciesInFn()"]
  ad17cc28_c934_cf1a_ce40_409d2c34592d -->|calls| dce98121_98e8_b5f8_3c93_a1b31e993439
  style dce98121_98e8_b5f8_3c93_a1b31e993439 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/HIR/PropagateScopeDependenciesHIR.ts lines 634–643

  enterInnerFn<T>(
    innerFn: TInstruction<FunctionExpression> | TInstruction<ObjectMethod>,
    cb: () => T,
  ): T {
    const prevContext = this.#innerFnContext;
    this.#innerFnContext = this.#innerFnContext ?? {outerInstrId: innerFn.id};
    const result = cb();
    this.#innerFnContext = prevContext;
    return result;
  }

Subdomains

Frequently Asked Questions

What does enterInnerFn() do?
enterInnerFn() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/PropagateScopeDependenciesHIR.ts.
Where is enterInnerFn() defined?
enterInnerFn() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/PropagateScopeDependenciesHIR.ts at line 634.
What calls enterInnerFn()?
enterInnerFn() is called by 2 function(s): collectDependencies, inferDependenciesInFn.

Analyze Your Own Codebase

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

Try Supermodel Free