React Hookers - v6.3.0
    Preparing search index...

    Function isShallowEqual

    • Performs a shallow equality comparison between two objects.

      Two objects are considered shallowly equal if:

      • They are the same reference.
      • Or they have the same set of own enumerable keys and each corresponding value is strictly equal.

      Nested objects are compared by reference, not by value.

      Parameters

      • a: object
      • b: object

      Returns boolean

      isShallowEqual({ x: 1 }, { x: 1 });
      // → true
      isShallowEqual(
      { x: { y: 1 } },
      { x: { y: 1 } },
      );
      // → false