News for hackers. Stuff that matters.
Re:Evergreen: a React UI Framework built by Segment by city41 on Wednesday October 17, 2018 @11:38AM (#18240095)
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.

There are no comments on this comment yet.