- Notifications
You must be signed in to change notification settings - Fork7.1k
Is it still necessary toimport isNill from lodash.isNill instad ofimport {isNil} from lodash?#5742
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
why we need to use importgroupByfrom'lodash.groupby'importisNilfrom'lodash.isnil' instead of below? import{groupBy,isNil}from'lodash' is this still needed? There are a bunch ofdifferent approaches and results and most of the are for 2020, 2019 or older. And what is the difference between the lodash |
BetaWas this translation helpful?Give feedback.
All reactions
For modern environments you should import from lodash-es.
import{groupBy}from'lodash-es'
Replies: 1 comment 4 replies
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
For modern environments you should import from lodash-es. import{groupBy}from'lodash-es' |
BetaWas this translation helpful?Give feedback.
All reactions
👍 2
-
Thank you for your response. It would be greatly appreciated if you answer this one: |
BetaWas this translation helpful?Give feedback.
All reactions
-
Assuming that none of your other dependencies rely on the base 'lodash' package, that's correct. If they do, however, you will likely get double lodash included. |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
-
importgroupByfrom'lodash/groupBy' What will happen if I use it like this?🧐 |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Then you'll get double There are so many different way to accidentally end up with multiple lodash packages installed. |
BetaWas this translation helpful?Give feedback.
All reactions
😄 1