Fork me on GitHub
#helix
<
2021-05-06
>
lilactown20:05:55

hmm that's tricky

lilactown20:05:51

in helix, you would do this like:

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

lilactown20:05:45

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

lilactown20:05:31

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

lilactown20:05:55

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

lilactown20:05:46

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

👍 2