Home / Function/ getReturnContext() — react Function Reference

getReturnContext() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  21db5fcc_9cef_b52f_8f79_acd74ad92218["getReturnContext()"]
  6e2aa007_860b_49d4_8a7b_6b55d63818e5["code-path-state.js"]
  21db5fcc_9cef_b52f_8f79_acd74ad92218 -->|defined in| 6e2aa007_860b_49d4_8a7b_6b55d63818e5
  fdc317a5_31e7_89af_23f5_c54520226a3f["popTryContext()"]
  fdc317a5_31e7_89af_23f5_c54520226a3f -->|calls| 21db5fcc_9cef_b52f_8f79_acd74ad92218
  a5f396e7_c8a7_b258_9811_e563f09bf755["makeReturn()"]
  a5f396e7_c8a7_b258_9811_e563f09bf755 -->|calls| 21db5fcc_9cef_b52f_8f79_acd74ad92218
  style 21db5fcc_9cef_b52f_8f79_acd74ad92218 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

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

function getReturnContext(state) {
  let context = state.tryContext;

  while (context) {
    if (context.hasFinalizer && context.position !== 'finally') {
      return context;
    }
    context = context.upper;
  }

  return state;
}

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free