Home / Function/ contains() — react Function Reference

contains() — react Function Reference

Architecture documentation for the contains() function in Stack.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  c70c54ad_9358_2a8e_bac4_d782e47bef4d["contains()"]
  279e1d0b_8d8a_c438_9e96_20699aec2836["Node"]
  c70c54ad_9358_2a8e_bac4_d782e47bef4d -->|defined in| 279e1d0b_8d8a_c438_9e96_20699aec2836
  5552422f_cc42_016b_fa16_693afdb44ec2["contains()"]
  5552422f_cc42_016b_fa16_693afdb44ec2 -->|calls| c70c54ad_9358_2a8e_bac4_d782e47bef4d
  5552422f_cc42_016b_fa16_693afdb44ec2["contains()"]
  c70c54ad_9358_2a8e_bac4_d782e47bef4d -->|calls| 5552422f_cc42_016b_fa16_693afdb44ec2
  style c70c54ad_9358_2a8e_bac4_d782e47bef4d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/Utils/Stack.ts lines 66–71

  contains(value: T): boolean {
    return (
      value === this.#value ||
      (this.#next !== null && this.#next.contains(value))
    );
  }

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does contains() do?
contains() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/Utils/Stack.ts.
Where is contains() defined?
contains() is defined in compiler/packages/babel-plugin-react-compiler/src/Utils/Stack.ts at line 66.
What does contains() call?
contains() calls 1 function(s): contains.
What calls contains()?
contains() is called by 1 function(s): contains.

Analyze Your Own Codebase

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

Try Supermodel Free