|
|
|
|
|
by city41
2803 days ago
|
|
Readability is important, your example above would need to be classNames({
mainClass: true,
[props.className]: props.className,
otherClass: somePredicate
})
The props.className one in particular is pretty garish. Probably should do !!props.className to help explain intent a bit, which adds to the tedium. Once you've added falsy thinning and arbitrary arguments, you're 99% of the way to classnames. |
|