Home / Function/ getChildHostContext() — react Function Reference

getChildHostContext() — react Function Reference

Architecture documentation for the getChildHostContext() function in ReactFiberConfigNative.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  48302530_c3de_36ac_1312_8cfc1487148b["getChildHostContext()"]
  3d20f780_732d_dfbf_ddf9_cb13ba9949a1["ReactFiberConfigNative.js"]
  48302530_c3de_36ac_1312_8cfc1487148b -->|defined in| 3d20f780_732d_dfbf_ddf9_cb13ba9949a1
  style 48302530_c3de_36ac_1312_8cfc1487148b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-native-renderer/src/ReactFiberConfigNative.js lines 270–287

export function getChildHostContext(
  parentHostContext: HostContext,
  type: string,
): HostContext {
  const prevIsInAParentText = parentHostContext.isInAParentText;
  const isInAParentText =
    type === 'AndroidTextInput' || // Android
    type === 'RCTMultilineTextInputView' || // iOS
    type === 'RCTSinglelineTextInputView' || // iOS
    type === 'RCTText' ||
    type === 'RCTVirtualText';

  if (prevIsInAParentText !== isInAParentText) {
    return {isInAParentText};
  } else {
    return parentHostContext;
  }
}

Domain

Subdomains

Frequently Asked Questions

What does getChildHostContext() do?
getChildHostContext() is a function in the react codebase, defined in packages/react-native-renderer/src/ReactFiberConfigNative.js.
Where is getChildHostContext() defined?
getChildHostContext() is defined in packages/react-native-renderer/src/ReactFiberConfigNative.js at line 270.

Analyze Your Own Codebase

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

Try Supermodel Free