Home / Function/ findCurrentHostFiberWithNoPortalsImpl() — react Function Reference

findCurrentHostFiberWithNoPortalsImpl() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  e45b4015_3d44_f5f0_74e3_4827eb51013d["findCurrentHostFiberWithNoPortalsImpl()"]
  0dbcf9fa_e6db_e53a_9527_79526654a3ff["ReactFiberTreeReflection.js"]
  e45b4015_3d44_f5f0_74e3_4827eb51013d -->|defined in| 0dbcf9fa_e6db_e53a_9527_79526654a3ff
  style e45b4015_3d44_f5f0_74e3_4827eb51013d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-reconciler/src/ReactFiberTreeReflection.js lines 298–322

function findCurrentHostFiberWithNoPortalsImpl(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) {
    if (child.tag !== HostPortal) {
      const match = findCurrentHostFiberWithNoPortalsImpl(child);
      if (match !== null) {
        return match;
      }
    }
    child = child.sibling;
  }

  return null;
}

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free