This provides a better experience than Tailwind, as you can use all CSS language features without learning new conventions while maintaining a per-component styling approach.
This also turns out to be more inspectable in the browser's dev-tools, as snippets are extracted as-is and are not fragmented across thousands of small classes.
I wanted something more optimized than other CSS-in-JS alternatives that generate CSS at runtime, so I created a ViteJS plugin for this. It extracts all style snippets, replaces them with classes like css-a1b2c3, and injects all the corresponding styles into a CSS file in place of an "@extracted-css" directive.
There is also a preact options hook that adds a custom "classList" attribute, which maps to clsx for easy class composition (similarly to VueJS, Svelte, etc.).
P.S. I know other frameworks exist, but I have really been enjoying using Preact for frontend development lately.