Home / Function/ is() — react Function Reference

is() — react Function Reference

Architecture documentation for the is() function in objectIs.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  dab343e7_d491_ab84_5374_66898c315624["is()"]
  6e14608c_da3e_3b32_c806_aa3aab42a0c9["objectIs.js"]
  dab343e7_d491_ab84_5374_66898c315624 -->|defined in| 6e14608c_da3e_3b32_c806_aa3aab42a0c9
  32442e80_d840_f60a_a31a_ea0e39ac487a["shallowEqual()"]
  32442e80_d840_f60a_a31a_ea0e39ac487a -->|calls| dab343e7_d491_ab84_5374_66898c315624
  style dab343e7_d491_ab84_5374_66898c315624 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/shared/objectIs.js lines 14–18

function is(x: any, y: any) {
  return (
    (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y) // eslint-disable-line no-self-compare
  );
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does is() do?
is() is a function in the react codebase, defined in packages/shared/objectIs.js.
Where is is() defined?
is() is defined in packages/shared/objectIs.js at line 14.
What calls is()?
is() is called by 1 function(s): shallowEqual.

Analyze Your Own Codebase

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

Try Supermodel Free