Closed i-like-robots closed 6 years ago
Preact and a few other libraries support functionality similar to the classnames module which can render or not render a list of class names depending on whether each key has a truthy or falsy value.
<div class={{ foo: true, bar: false }}></div> // => <div class="foo"></div>
Looks like this was removed in Preact 8 which recommends using classnames instead so closing this.
Preact and a few other libraries support functionality similar to the classnames module which can render or not render a list of class names depending on whether each key has a truthy or falsy value.