Home / Function/ getHostNode() — react Function Reference

getHostNode() — react Function Reference

Architecture documentation for the getHostNode() function in ReactNativeFiberInspector.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  504aef00_0513_3316_fb99_9e268f03e589["getHostNode()"]
  b96e6f5e_b1ed_ae54_d2fa_ae1632468aa8["ReactNativeFiberInspector.js"]
  504aef00_0513_3316_fb99_9e268f03e589 -->|defined in| b96e6f5e_b1ed_ae54_d2fa_ae1632468aa8
  9cfaa716_ad4d_47af_982b_53e1f7df89d7["createHierarchy()"]
  9cfaa716_ad4d_47af_982b_53e1f7df89d7 -->|calls| 504aef00_0513_3316_fb99_9e268f03e589
  a3dc8ce3_5fa4_00f6_cc2f_856df9b1b09d["findNodeHandle()"]
  504aef00_0513_3316_fb99_9e268f03e589 -->|calls| a3dc8ce3_5fa4_00f6_cc2f_856df9b1b09d
  style 504aef00_0513_3316_fb99_9e268f03e589 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-native-renderer/src/ReactNativeFiberInspector.js lines 64–78

  const getHostNode = function (fiber: Fiber | null) {
    let hostNode;
    // look for children first for the hostNode
    // as composite fibers do not have a hostNode
    while (fiber) {
      if (fiber.stateNode !== null && fiber.tag === HostComponent) {
        hostNode = findNodeHandle(fiber.stateNode);
      }
      if (hostNode) {
        return hostNode;
      }
      fiber = fiber.child;
    }
    return null;
  };

Domain

Subdomains

Called By

Frequently Asked Questions

What does getHostNode() do?
getHostNode() is a function in the react codebase, defined in packages/react-native-renderer/src/ReactNativeFiberInspector.js.
Where is getHostNode() defined?
getHostNode() is defined in packages/react-native-renderer/src/ReactNativeFiberInspector.js at line 64.
What does getHostNode() call?
getHostNode() calls 1 function(s): findNodeHandle.
What calls getHostNode()?
getHostNode() is called by 1 function(s): createHierarchy.

Analyze Your Own Codebase

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

Try Supermodel Free