Home / Function/ findCurrentHostFiberImpl() — react Function Reference

findCurrentHostFiberImpl() — react Function Reference

Architecture documentation for the findCurrentHostFiberImpl() function in ReactFiberTreeReflection.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  6a398a54_fee2_000b_8907_5eef4aaaaea7["findCurrentHostFiberImpl()"]
  b49c4002_4b07_c5b1_6176_4a2d8030e11e["ReactFiberTreeReflection.js"]
  6a398a54_fee2_000b_8907_5eef4aaaaea7 -->|defined in| b49c4002_4b07_c5b1_6176_4a2d8030e11e
  style 6a398a54_fee2_000b_8907_5eef4aaaaea7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-reconciler/src/ReactFiberTreeReflection.js lines 267–289

function findCurrentHostFiberImpl(node: Fiber): Fiber | null {
  // Next we'll drill down this component to find the first HostComponent/Text.
  const tag = node.tag;
  if (
    tag === HostComponent ||
    tag === HostHoistable ||
    tag === HostSingleton ||
    tag === HostText
  ) {
    return node;
  }

  let child = node.child;
  while (child !== null) {
    const match = findCurrentHostFiberImpl(child);
    if (match !== null) {
      return match;
    }
    child = child.sibling;
  }

  return null;
}

Domain

Subdomains

Frequently Asked Questions

What does findCurrentHostFiberImpl() do?
findCurrentHostFiberImpl() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberTreeReflection.js.
Where is findCurrentHostFiberImpl() defined?
findCurrentHostFiberImpl() is defined in packages/react-reconciler/src/ReactFiberTreeReflection.js at line 267.

Analyze Your Own Codebase

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

Try Supermodel Free