Skip to content

Commit

Permalink
refactor: replace lodash/isEqual with react-fast-compare
Browse files Browse the repository at this point in the history
  • Loading branch information
guoyunhe committed Jan 30, 2024
1 parent 5752f30 commit 28bbae3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"intersection-observer": "^0.12.0",
"js-cookie": "^2.x.x",
"lodash": "^4.17.21",
"react-fast-compare": "^3.2.2",
"resize-observer-polyfill": "^1.5.1",
"screenfull": "^5.0.0",
"tslib": "^2.4.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/src/utils/depsEqual.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { DependencyList } from 'react';
import isEqual from 'lodash/isEqual';
import isEqual from 'react-fast-compare';

export const depsEqual = (aDeps: DependencyList = [], bDeps: DependencyList = []) =>
isEqual(aDeps, bDeps);

0 comments on commit 28bbae3

Please sign in to comment.