helix

https://github.com/Lokeh/helix
lilactown 2021-05-06T20:50:55.056Z

hmm that's tricky

lilactown 2021-05-06T20:51:51.057Z

in helix, you would do this like:

($ "brick-flipbox" {:class "demo"}
  (d/div "front")
  (d/div "back"))

lilactown 2021-05-06T20:52:45.058Z

$ detects that the component type you passed in is a string, and will do DOM-specific transformations... like converting class to className 😞

lilactown 2021-05-06T20:53:31.058900Z

this behavior will actually go away soon, as in the last version I introduced a react-dom specific helix.dom/$d which you can call explicitly to do that transformation

lilactown 2021-05-06T20:53:55.059600Z

since in a lot of contexts, those transformations are invalid - e.g. in web components 😅, react native, and other renderers

lilactown 2021-05-06T20:54:46.060300Z

you could write your own $wc using the same tools that $d uses to e.g. opt out of the class->className conversion

1👍