|
|
|
|
|
by exogen
2680 days ago
|
|
Good software is reusable. I can import functions from 1,000,000 different npm modules all into my project and they don't fuck with each other, right? Let's say you wanted to pull in a button from Bootstrap for one part of your page, a button from Material UI elsewhere, a button from Semantic UI elsewhere, etc. These things are made to be reusable right? What are the chances you can do that without issues? Do you think any of their style rules/selectors would clobber each other? What about the base/assumed CSS that they all most likely require? What about components more complicated than a button? Without actually trying it, how much confidence do you have in your guess, vs. your assumptions about importing other things (like functions from npm modules)? Good software is reusable without worry. |
|
I just spent the whole day trying to fix compatibility issues between different versions of npm libraries transitively imported in a project. Reusability in JS is a joke.