Comment

Comment by matb33

We’ve been doing:

  const classNames = [
    “btn”,
    this.props.isSelected && “btn-selected”
  ].filter(Boolean).join(“ “)
parent matb33 8 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton