DEV Community

Discussion on: Let's talk about Lodash

Collapse
 
eldarshamukhamedov profile image
Eldar Shamukhamedov

I've found the opposite. Folks write custom implementations of deep merge, intersection, is plain object, etc. and miss edge cases. These helpers then end up being used all over the place, which makes it very hard to fix any issues.

For sure use native JS built-ins over Lodash, but if you're considering writing your own version of one of the more complex Lodash helpers, at least go read their source code first.

Collapse
 
janpauldahlke profile image
jan paul

y the deepcopy stuff is still very viable

Collapse
 
lexlohr profile image
Alex Lohr

That's what I mean with unnecessary complexity. There are less problems that strictly require these functions than one would think.

Also, things like deep cloning also have issues in lodash and other tools, see github.com/atk/object-clone-propos...

So using these tools is not a silver bullet. As I said, if you use them, make it count, but try to solve the underlying issue before you grab these tools.