Home / Function/ popBreakContext() — react Function Reference

popBreakContext() — react Function Reference

Architecture documentation for the popBreakContext() function in code-path-state.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  eaeeec6b_36c1_6d87_b602_172b094af25b["popBreakContext()"]
  d3cee22c_5e2d_f853_c075_2c7c55e5d22c["CodePathState"]
  eaeeec6b_36c1_6d87_b602_172b094af25b -->|defined in| d3cee22c_5e2d_f853_c075_2c7c55e5d22c
  998aa69c_660b_1912_c7d1_55b3eb1f45b7["popSwitchContext()"]
  998aa69c_660b_1912_c7d1_55b3eb1f45b7 -->|calls| eaeeec6b_36c1_6d87_b602_172b094af25b
  941f950b_cd48_1b4b_82f0_a7c8f79c78b6["popLoopContext()"]
  941f950b_cd48_1b4b_82f0_a7c8f79c78b6 -->|calls| eaeeec6b_36c1_6d87_b602_172b094af25b
  style eaeeec6b_36c1_6d87_b602_172b094af25b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/eslint-plugin-react-hooks/src/code-path-analysis/code-path-state.js lines 1317–1334

  popBreakContext() {
    const context = this.breakContext;
    const forkContext = this.forkContext;

    this.breakContext = context.upper;

    // Process this context here for other than switches and loops.
    if (!context.breakable) {
      const brokenForkContext = context.brokenForkContext;

      if (!brokenForkContext.empty) {
        brokenForkContext.add(forkContext.head);
        forkContext.replaceHead(brokenForkContext.makeNext(0, -1));
      }
    }

    return context;
  }

Domain

Subdomains

Frequently Asked Questions

What does popBreakContext() do?
popBreakContext() is a function in the react codebase, defined in packages/eslint-plugin-react-hooks/src/code-path-analysis/code-path-state.js.
Where is popBreakContext() defined?
popBreakContext() is defined in packages/eslint-plugin-react-hooks/src/code-path-analysis/code-path-state.js at line 1317.
What calls popBreakContext()?
popBreakContext() is called by 2 function(s): popLoopContext, popSwitchContext.

Analyze Your Own Codebase

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

Try Supermodel Free