i-like-robots / hyperons

🔥 The fastest JSX to string renderer on the server and in the browser.
https://www.npmjs.com/package/hyperons
MIT License
45 stars 4 forks source link

Support class names when provided as an object #17

Closed i-like-robots closed 6 years ago

i-like-robots commented 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>
i-like-robots commented 6 years ago

Looks like this was removed in Preact 8 which recommends using classnames instead so closing this.