Comparator: ((state: any, newState: any) => boolean)

Type declaration

    • (state: any, newState: any): boolean
    • A function used to compare two state objects for equality.

      Example

      const customCompare: Comparator = (x: any, y: any) => {
      return x.id === y.id
      }

      @Select(selector, customCompare)

      Returns

      Whether the two state objects are equal.

      Parameters

      • state: any

        The original state object.

      • newState: any

        The new state object.

      Returns boolean

Generated using TypeDoc