|
|
|
|
|
by jhall1468
2806 days ago
|
|
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 of code. |
|
> 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:
> You'll often need to combine themNeed is definitely not the right word here. The classNames utility is a completely unnecessary abstraction.