Skip to content

Commit

Permalink
feat: remove lodash (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense authored Mar 3, 2021
1 parent 2629e4b commit fefa63c
Show file tree
Hide file tree
Showing 4 changed files with 2,091 additions and 2,567 deletions.
9 changes: 0 additions & 9 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@
"modules": false
}
]
],
"plugins": [
[
"babel-plugin-transform-rename-import",
{
"original": "lodash",
"replacement": "lodash-es"
}
]
]
},
"test": {
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
"typescript": "^4.1.3"
},
"dependencies": {
"lodash": "^4.17.20",
"lodash-es": "^4.17.20"
"dequal": "^2.0.2"
}
}
4 changes: 2 additions & 2 deletions src/useMutationObserver.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import useCustomEffect from './useCustomEffect'
import isEqual from 'lodash/isEqual'
import { dequal } from 'dequal'
import useImmediateUpdateEffect from './useImmediateUpdateEffect'
import useEventCallback from './useEventCallback'

Expand All @@ -9,7 +9,7 @@ function isDepsEqual(
[nextElement, nextConfig]: Deps,
[prevElement, prevConfig]: Deps,
) {
return nextElement === prevElement && isEqual(nextConfig, prevConfig)
return nextElement === prevElement && dequal(nextConfig, prevConfig)
}

/**
Expand Down
Loading

0 comments on commit fefa63c

Please sign in to comment.