Earlier quoted context omitted.
> Your little utility here doesn’t cover the whole 'classnames' API. Thats partly the point. The whole API doesn't really need to be covered in order to achieve the same utility. I think the library clearly over-engineered the simple task of string concatenation, and their API is redundant. Their API caters to too many styles and that increases its complexity. It takes 2 seconds to grok the two lines in my utility, w…
You don't "agree" on a convention, they have different use cases. Sometimes you'll want to merge a bunch of class names so you use array-style. Other times you have class names that have prop dependencies so you use object style and finally you'll want to merge in some always-on defaults so you have string style. You'll often need to combine them, depending on use-case. That's a whole lot of complaints for 50 lines o…
> Other times you have class names that have prop dependencies so you use object style
> merge in some always-on defaults so you have string style
There's some irony here -- all of this just to avoid dealing with string templates:
`${class1} ${class2} ${class3}`
> You'll often need to combine themNeed is definitely not the right word here. The classNames utility is a completely unnecessary abstraction.