@rpcbase/client 0.253.0 → 0.254.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/client",
3
- "version": "0.253.0",
3
+ "version": "0.254.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "scripts": {
@@ -1,7 +1,7 @@
1
1
  import {useState, useEffect, useRef, useCallback} from "react"
2
2
  import useMeasure from "react-use/lib/useMeasure"
3
3
  import _throttle from "lodash/throttle"
4
- import { isEqual } from "fast-equals"
4
+ import { deepEqual } from "fast-equals"
5
5
 
6
6
 
7
7
  const DEFAULT_THROTTLE_TIME = 16
@@ -18,7 +18,7 @@ export const useThrottledMeasure = (throttleDuration = DEFAULT_THROTTLE_TIME) =>
18
18
  _throttle(
19
19
  (newRect) => {
20
20
  setRect((current) => {
21
- return isEqual(current, newRect) ? current : newRect
21
+ return deepEqual(current, newRect) ? current : newRect
22
22
  })
23
23
  },
24
24
  throttleDuration,
@@ -31,7 +31,7 @@ export const useThrottledMeasure = (throttleDuration = DEFAULT_THROTTLE_TIME) =>
31
31
  if (measuredRect.width > 0 && !hasInitialMeasure.current) {
32
32
  hasInitialMeasure.current = true
33
33
  setRect((current) => {
34
- return isEqual(current, measuredRect) ? current : measuredRect
34
+ return deepEqual(current, measuredRect) ? current : measuredRect
35
35
  })
36
36
  return
37
37
  }