Skip to content

Why use lodash? #2522

Answered by johnrom
teiger313 asked this question in General
Discussion options

You must be logged in to vote

There's a constant balance between maintaining our own versions of these methods, the cost of including lodash itself (anywhere from minimal to high, depending on a number of factors), and the "maintainer" cost of having to find other ways to perform these methods when the maintainer may just be very familiar with the lodash version. It's the modern version of the "why jquery" problem, but with the added caveat that our import of lodash functions means that if our users import those same lodash functions, they are actually saving file size by using the same imports, if done correctly.

I will say that I am really not an expert at webpack's tree-shaking, but it is my understanding that in c…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by maddhruv
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants