Home / Function/ finalizeInitialChildren() — react Function Reference

finalizeInitialChildren() — react Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

packages/react-native-renderer/src/ReactFiberConfigNative.js lines 237–262

export function finalizeInitialChildren(
  parentInstance: Instance,
  type: string,
  props: Props,
  hostContext: HostContext,
): boolean {
  // Don't send a no-op message over the bridge.
  if (parentInstance._children.length === 0) {
    return false;
  }

  // Map from child objects to native tags.
  // Either way we need to pass a copy of the Array to prevent it from being frozen.
  const nativeTags = parentInstance._children.map(child =>
    typeof child === 'number'
      ? child // Leaf node (eg text)
      : child._nativeTag,
  );

  UIManager.setChildren(
    parentInstance._nativeTag, // containerTag
    nativeTags, // reactTags
  );

  return false;
}

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free