Agreed, I think classNames is a bit of overkill for what is essentially concatenation of strings. However template literals can get hectic and hard to reason about very quickly. What I normally do is:
const componentClassName = [
someBooleanCondition && 'a-class-in-here',
someOtherBoolean && 'another-class',
Written on a mobile so forgive any typos!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.