Home / Function/ diffNestedArrayProperty() — react Function Reference

diffNestedArrayProperty() — react Function Reference

Architecture documentation for the diffNestedArrayProperty() function in ReactNativeAttributePayload.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  ded3bedf_290c_dc96_953f_83eac8b40e92["diffNestedArrayProperty()"]
  3429d3f6_3e01_954f_bb31_157d6bedf858["ReactNativeAttributePayload.js"]
  ded3bedf_290c_dc96_953f_83eac8b40e92 -->|defined in| 3429d3f6_3e01_954f_bb31_157d6bedf858
  ea9f62a5_988f_c1db_f298_cf0ee0a3d31e["clearNestedProperty()"]
  ded3bedf_290c_dc96_953f_83eac8b40e92 -->|calls| ea9f62a5_988f_c1db_f298_cf0ee0a3d31e
  style ded3bedf_290c_dc96_953f_83eac8b40e92 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-native-renderer/src/ReactNativeAttributePayload.js lines 111–137

function diffNestedArrayProperty(
  updatePayload: null | Object,
  prevArray: Array<NestedNode>,
  nextArray: Array<NestedNode>,
  validAttributes: AttributeConfiguration,
): null | Object {
  const minLength =
    prevArray.length < nextArray.length ? prevArray.length : nextArray.length;
  let i;
  for (i = 0; i < minLength; i++) {
    // Diff any items in the array in the forward direction. Repeated keys
    // will be overwritten by later values.
    updatePayload = diffNestedProperty(
      updatePayload,
      prevArray[i],
      nextArray[i],
      validAttributes,
    );
  }
  for (; i < prevArray.length; i++) {
    // Clear out all remaining properties.
    updatePayload = clearNestedProperty(
      updatePayload,
      prevArray[i],
      validAttributes,
    );
  }

Domain

Subdomains

Frequently Asked Questions

What does diffNestedArrayProperty() do?
diffNestedArrayProperty() is a function in the react codebase, defined in packages/react-native-renderer/src/ReactNativeAttributePayload.js.
Where is diffNestedArrayProperty() defined?
diffNestedArrayProperty() is defined in packages/react-native-renderer/src/ReactNativeAttributePayload.js at line 111.
What does diffNestedArrayProperty() call?
diffNestedArrayProperty() calls 1 function(s): clearNestedProperty.

Analyze Your Own Codebase

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

Try Supermodel Free