Fork me on GitHub
#helix
<
2021-04-24
>
Emmanuel John18:04:37

Forgive me if this is fairly obvious but can anyone explain what this means exactly?

helix.dom/$d helper for rendering components with DOM props coercion; e.g. ($d material-ui/button {:class ["foo" "bar"]})

Emmanuel John18:04:00

Correct me if I’m wrong but this allows you to pass DOM props to components that pass them through to their DOM elements.

Emmanuel John18:04:15

It looks so similar to $ but it’s in the dom namespace. Shouldn’t this go in the core namespace instead?

wilkerlucio19:04:31

I believe it lives in the dom namespace because its doing things that are consistent in the React.DOM, but not on other places, for example, using :class ["a" "b"] to translate into :className "a b" is something specific from React.DOM, not a valid thing on React Native for example

☝️ 5
👍 5