r/ProgrammerAnimemes • • Jan 30 '20

OC Dependencies

Enable HLS to view with audio, or disable this notification

1.6k Upvotes

39 comments sorted by

View all comments

Show parent comment

2

u/bucket3432 Jan 31 '20

If you are already using it in a bunch of places (you are already paying the bundle size price) it doesn't matter if you use it for a trivial task.

Certainly, and that's part of what the "they might already have solutions for what you need" line was alluding to.

Would you extend this to using a dependency of a dependency (e.g. using lodash if one of your dependencies uses lodash)? I'm not sure if I would, because although the bundle size doesn't change, you're still adding a dependency. The package using the library might upgrade to an incompatible version or move away from it altogether in a future version, leaving you with a separate copy of the library.