Suppose use-case for conditional applying classes:
import { render } from "preact";
import { html } from "htm/preact";
let el = document.createElement("div");
render(
html`
<div class="${false} ${null} ${undefined} ${"foo"}" />
`,
el
);
console.log(el.innerHTML);
// <div class="false null undefined foo"></div>
Sandbox
That's unexpected that the htm serializes false/null class values literally.
That can be worked around with clsx or alike, but.