I don't understand why so many devs use the Lodash versions of native functions instead of adding a shim. You can't both complain about a lack of native tools and not use the ones we have, folks.
To be clear, I have absolutely no issue with Lodash in itself - I use it a lot for the new tools it brings to the language. My remark only applies on those who are natively available.
If you're using lots of lodash functions in addition to the native ones, it's cleaner to read and write code running everything through there, rather than special-casing the ones that are worth shimming.
Internally lodash is pretty good at falling back to native functions where available if it's sensible, remaining extremely compatible with them (so you could migrate very easily if you wanted), and ensuring great performance.
Personally I use lots and lots of lodash functions, and while the ones listed here are useful to have natively, they're not the majority of the methods I use. Lodash is really good, native has a long way to include everything Lodash has (and I'm not sure it would be sensible to do so), and if you're going to include Lodash anyway you might as well use it for everything.
5
u/arcanin 🧶 Yarn maintainer Jan 26 '16
I don't understand why so many devs use the Lodash versions of native functions instead of adding a shim. You can't both complain about a lack of native tools and not use the ones we have, folks.
To be clear, I have absolutely no issue with Lodash in itself - I use it a lot for the new tools it brings to the language. My remark only applies on those who are natively available.