Home / Function/ getMaskedContext() — react Function Reference

getMaskedContext() — react Function Reference

Architecture documentation for the getMaskedContext() function in ReactFizzLegacyContext.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  9c730094_6a03_6190_4af0_e8093e6a79d7["getMaskedContext()"]
  4825696d_2f43_1121_7cc9_951fbe850d0a["ReactFizzLegacyContext.js"]
  9c730094_6a03_6190_4af0_e8093e6a79d7 -->|defined in| 4825696d_2f43_1121_7cc9_951fbe850d0a
  style 9c730094_6a03_6190_4af0_e8093e6a79d7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-server/src/ReactFizzLegacyContext.js lines 24–40

export function getMaskedContext(type: any, unmaskedContext: Object): Object {
  if (disableLegacyContext) {
    return emptyContextObject;
  } else {
    const contextTypes = type.contextTypes;
    if (!contextTypes) {
      return emptyContextObject;
    }

    const context: {[string]: $FlowFixMe} = {};
    for (const key in contextTypes) {
      context[key] = unmaskedContext[key];
    }

    return context;
  }
}

Domain

Subdomains

Frequently Asked Questions

What does getMaskedContext() do?
getMaskedContext() is a function in the react codebase, defined in packages/react-server/src/ReactFizzLegacyContext.js.
Where is getMaskedContext() defined?
getMaskedContext() is defined in packages/react-server/src/ReactFizzLegacyContext.js at line 24.

Analyze Your Own Codebase

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

Try Supermodel Free