Skip to content

Commit 07ea893

Browse files
committed
Switch to react-fast-compare for fewer polyfills which break in remote-ui, and for smaller bundle size
1 parent f291302 commit 07ea893

File tree

3 files changed

+40
-96
lines changed

3 files changed

+40
-96
lines changed

packages/react/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
},
3030
"dependencies": {
3131
"@gadgetinc/api-client-core": "^0.15.0",
32-
"deep-equal": "^2.2.0",
32+
"react-fast-compare": "^3.2.2",
3333
"urql": "^4.0.4"
3434
},
3535
"resolutions": {
@@ -39,7 +39,6 @@
3939
"@gadgetinc/api-client-core": "workspace:*",
4040
"@testing-library/jest-dom": "^5.16.5",
4141
"@testing-library/react": "^13.4.0",
42-
"@types/deep-equal": "^1.0.1",
4342
"@types/jest": "^29.5.2",
4443
"@types/lodash": "^4.14.191",
4544
"@types/node": "^18.0.0",

packages/react/src/useStructuralMemo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import deepEqual from "deep-equal";
21
import { useRef } from "react";
2+
import deepEqual from "react-fast-compare";
33

44
/**
55
* Memoize and ensure a stable identity on a given value as long as it remains the same, structurally.

0 commit comments

Comments
 (0)