lukeed / clsx

A tiny (239B) utility for constructing `className` strings conditionally.
MIT License
8.28k stars 143 forks source link

Why should this be used for only class names? #37

Closed roydukkey closed 3 years ago

roydukkey commented 3 years ago

Couldn't this be used for any attribute?

lukeed commented 3 years ago

It can used for anything, even outside of a DOM world, but classnames are the common scenario.

But ya, it's just string concatenation