Home / Function/ isAncestor() — react Function Reference

isAncestor() — react Function Reference

Architecture documentation for the isAncestor() function in ResponderEventPlugin.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  ba0a3c44_5cde_86ea_d40b_036ef5700dd2["isAncestor()"]
  674c6180_b91e_e17d_fb2d_40a6a3631bb3["ResponderEventPlugin.js"]
  ba0a3c44_5cde_86ea_d40b_036ef5700dd2 -->|defined in| 674c6180_b91e_e17d_fb2d_40a6a3631bb3
  245511e8_def9_c356_241b_db9e7eaf90f5["noResponderTouches()"]
  245511e8_def9_c356_241b_db9e7eaf90f5 -->|calls| ba0a3c44_5cde_86ea_d40b_036ef5700dd2
  5150711c_d8bc_1881_a612_f2d9f4cd1d44["getParent()"]
  ba0a3c44_5cde_86ea_d40b_036ef5700dd2 -->|calls| 5150711c_d8bc_1881_a612_f2d9f4cd1d44
  style ba0a3c44_5cde_86ea_d40b_036ef5700dd2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-native-renderer/src/legacy-events/ResponderEventPlugin.js lines 213–221

function isAncestor(instA, instB) {
  while (instB) {
    if (instA === instB || instA === instB.alternate) {
      return true;
    }
    instB = getParent(instB);
  }
  return false;
}

Domain

Subdomains

Calls

Frequently Asked Questions

What does isAncestor() do?
isAncestor() is a function in the react codebase, defined in packages/react-native-renderer/src/legacy-events/ResponderEventPlugin.js.
Where is isAncestor() defined?
isAncestor() is defined in packages/react-native-renderer/src/legacy-events/ResponderEventPlugin.js at line 213.
What does isAncestor() call?
isAncestor() calls 1 function(s): getParent.
What calls isAncestor()?
isAncestor() is called by 1 function(s): noResponderTouches.

Analyze Your Own Codebase

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

Try Supermodel Free